<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetMargins="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Margins;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:worksheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:spreadsheetUtilities="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Utilities;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:worksheetCommands="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets.Commands;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:dialogs="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Dialogs;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:charts="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Charts;assembly=Telerik.Windows.Controls.Spreadsheet"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
  <ResourceDictionary.MergedDictionaries>
    <telerik:Windows11ResourceDictionary/>
  </ResourceDictionary.MergedDictionaries>
  <telerik1:ColorToBrushConverter x:Key="converter"/>
  <telerik1:DragDropBooleanToVisibilityConverter x:Key="DragDropBooleanToVisibilityConverter"/>
  <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
  <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
  <telerik1:OpacityConverter x:Key="OpacityConverter"/>
  <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
  <Geometry x:Key="ArrowBottomLeft7x7">M0,7 L0,0 7,7z</Geometry>
  <Geometry x:Key="AlertIcon">M4,25 C6.2,25 8,26.8 8,29 8,31.2 6.2,33 4,33 1.8,33 0,31.2 0,29 0,26.8 1.8,25 4,25 z M0.5,0 L7.5,0 6.5,22 1.5,22 z</Geometry>
  <Geometry x:Key="ConfirmIcon">M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z</Geometry>
  <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/old/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
  <sys:String x:Key="GlyphArrow60Right"></sys:String>
  <sys:String x:Key="GlyphArrow60Down"></sys:String>
  <sys:String x:Key="GlyphArrow60Left"></sys:String>
  <sys:String x:Key="GlyphArrowForward"></sys:String>
  <sys:String x:Key="GlyphArrowBackward"></sys:String>
  <sys:String x:Key="GlyphArrowsKpi"></sys:String>
  <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
  <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
  <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
  <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
  <sys:String x:Key="GlyphArrowRight"></sys:String>
  <sys:String x:Key="GlyphMoreVertical"></sys:String>
  <sys:String x:Key="GlyphLinkHorizontal"></sys:String>
  <sys:String x:Key="GlyphCancel"></sys:String>
  <sys:String x:Key="GlyphCheck"></sys:String>
  <sys:String x:Key="GlyphClose"></sys:String>
  <sys:String x:Key="GlyphPlus"></sys:String>
  <sys:String x:Key="GlyphMinus"></sys:String>
  <sys:String x:Key="GlyphFilter"></sys:String>
  <sys:String x:Key="GlyphIndentIncrease"></sys:String>
  <sys:String x:Key="GlyphInsertUp"></sys:String>
  <sys:String x:Key="GlyphInsertDown"></sys:String>
  <sys:String x:Key="GlyphCopy"></sys:String>
  <sys:String x:Key="GlyphHyperlink"></sys:String>
  <sys:String x:Key="GlyphFormulaFx"></sys:String>
  <sys:String x:Key="GlyphEmail"></sys:String>
  <Style x:Key="FocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=FocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Opacity" Value="0"/>
  </Style>
  <Style x:Key="InputFocusVisualBorderStyle" TargetType="Border">
    <Setter Property="Background" Value="{x:Null}"/>
    <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush)}"/>
    <Setter Property="BorderThickness" Value="{telerik1:Windows11Resource ResourceKey=InputFocusThickness}"/>
    <Setter Property="SnapsToDevicePixels" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SnapsToDevicePixels}"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Visibility" Value="Collapsed"/>
  </Style>
  <Style x:Key="DefaultItemPillStyle" TargetType="Rectangle">
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="3"/>
    <Setter Property="Fill" Value="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="RadiusX" Value="1.5"/>
    <Setter Property="RadiusY" Value="1.5"/>
    <Setter Property="Opacity" Value="0"/>
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
  </Style>
  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
  <SolidColorBrush x:Key="CommentIndicatorBrush" Color="#CC66CC"/>
  <SolidColorBrush x:Key="CommentInfoMessageBrush" Color="#CCA329"/>
  <sys:Double x:Key="CommentMinHeight">112</sys:Double>
  <sys:Double x:Key="CommentMinWidth">300</sys:Double>
  <sys:Double x:Key="CommentListMaxHeight">270</sys:Double>
  <sys:Double x:Key="CommentActionButtonMinWidth">55</sys:Double>
  <sys:Double x:Key="CommentsTaskPaneMaxWidth">780</sys:Double>
  <sys:Double x:Key="TaskPaneCommentMinHeight">76</sys:Double>
  <SolidColorBrush x:Key="TransparentBrush" Color="#00FFFFFF"/>
  <ext:DynamicResourceProxy x:Key="AccentSelectedBrushProxy" ProxyValue="{Binding Source={x:Static telerik:Windows11Palette.Palette}, Path=AccentSelectedColor}"/>
  <SolidColorBrush x:Key="SelectionFillBrush" Color="{Binding Source={StaticResource AccentSelectedBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=20}"/>
  <Color x:Key="ThemeControlDropShadowEffectColor">#FF455F7E</Color>
  <SolidColorBrush x:Key="ThemeControlLightBrush" Color="#FFDADADA"/>
  <SolidColorBrush x:Key="ThemeControlLowBrush" Color="#FF9FADBF"/>
  <SolidColorBrush x:Key="ThemeControlMediumBrush" Color="#FF616C81"/>
  <SolidColorBrush x:Key="ThemeControlHighBrush" Color="#FF344C64"/>
  <SolidColorBrush x:Key="ThemeControlPathFillBrush" Color="#FFE4EBF5"/>
  <SolidColorBrush x:Key="ThemeControlRectangleStrokeBrush" Color="#FF868686"/>
  <SolidColorBrush x:Key="ThemeControlFontPreviewDarkBrush" Color="#FFC3C8D5"/>
  <Thickness x:Key="DialogsInnerContentMargin">16 12</Thickness>
  <Thickness x:Key="DialogsFooterMargin">13 0</Thickness>
  <Thickness x:Key="DialogsFooterOneButtonMargin">64 0</Thickness>
  <Thickness x:Key="DialogsFooterButtonMargin">2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentSamplesMargin">2 12 2 0</Thickness>
  <Thickness x:Key="FormatCellsTabContentHelpTextMargin">2 10 0 10</Thickness>
  <Thickness x:Key="GeneralLabelOffset">0 5</Thickness>
  <telerik:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
  <telerik:BooleanToVisibilityConverter x:Key="SpreadsheetBooleanToVisibilityConverter"/>
  <spreadsheetControls:PredefinedConditionalFormatToStringConverter x:Key="PredefinedConditionalFormatToStringConverter"/>
  <spreadsheetControls:PageOrientationToBooleanConverter x:Key="PageOrientationToBooleanConverter"/>
  <spreadsheetControls:ScalingMethodToBooleanConverter x:Key="ScalingMethodToBooleanConverter"/>
  <spreadsheetControls:PageOrderToBooleanConverter x:Key="PageOrderToBooleanConverter"/>
  <spreadsheetControls:PatternTypeToIntConverter x:Key="PatternTypeToIntConverter"/>
  <spreadsheetControls:ColorToThemableColorConverter x:Key="ColorToThemableColorConverter"/>
  <spreadsheetControls:ShadingStyleToBooleanConverter x:Key="ShadingStyleToBooleanConverter"/>
  <spreadsheetControls:FillTabStateToVisibilityConverter x:Key="FillTabStateToVisibilityConverter"/>
  <spreadsheetControls:RadHorizontalAlignmentToStringConverter x:Key="RadHorizontalAlignmentToStringConverter"/>
  <spreadsheetControls:RadVerticalAlignmentToStringConverter x:Key="RadVerticalAlignmentToStringConverter"/>
  <spreadsheetControls:FormatStringCategoryToStringConverter x:Key="FormatStringCategoryToStringConverter"/>
  <spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter"/>
  <spreadsheetControls:UnderlineTypesToStringConverter x:Key="UnderlineTypesToStringConverter"/>
  <spreadsheetControls:SeriesTypeToBooleanConverter x:Key="SeriesTypeToBooleanConverter"/>
  <spreadsheetControls:SeriesOrientationToBooleanConverter x:Key="SeriesOrientationToBooleanConverter"/>
  <spreadsheetControls:SeriesDateUnitToBooleanConverter x:Key="SeriesDateUnitToBooleanConverter"/>
  <spreadsheetControls:BooleanToInversedBooleanConverter x:Key="BooleanToInversedBooleanConverter"/>
  <spreadsheetControls:CellIndexToNameConverter x:Key="CellIndexToNameConverter"/>
  <spreadsheetControls:IntToColumnNameConverter x:Key="IntToColumnNameConverter"/>
  <spreadsheetControls:SortTypeToStringConverter x:Key="SortTypeToStringConverter"/>
  <spreadsheetControls:DoubleToPercentConverter x:Key="doubleToPercentConverter"/>
  <spreadsheetControls:CellValueFormatToNumberFormatInfoConverter x:Key="cellValueFormatToNumberFormatInfoConverter"/>
  <spreadsheetControls:BoolToVisibilityValueConverter x:Key="BoolToVisibilityValueConverter"/>
  <spreadsheetControls:InversedBoolToVisibilityValueConverter x:Key="InversedBoolToVisibilityValueConverter"/>
  <spreadsheetControls:BoolToIntegerConverter x:Key="BoolToIntegerConverter"/>
  <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
  <spreadsheetControls:PatternFillToBackgroundColorConverter x:Key="PatternFillToBackgroundColorConverter"/>
  <spreadsheetControls:PatternFillToPatternColorConverter x:Key="PatternFillToPatternColorConverter"/>
  <spreadsheetControls:LogicalOperatorToBooleanConverter x:Key="LogicalOperatorToBooleanConverter"/>
  <spreadsheetControls:TopBottomFilterTypeToStringConverter x:Key="TopBottomFilterTypeToStringConverter"/>
  <spreadsheetControls:ItemsPercentFilterTypeToStringConverter x:Key="ItemsPercentFilterTypeToStringConverter"/>
  <spreadsheetControls:ComparisonOperatorItemToStringConverter x:Key="ComparisonOperatorItemToStringConverter"/>
  <spreadsheetControls:FilterToVisibilityConverter x:Key="FilterToVisibilityConverter"/>
  <spreadsheetControls:NameScopeToStringConverter x:Key="NameScopeToStringConverter"/>
  <spreadsheetControls:BoolToVisibilityMultipleValuesConverter x:Key="BoolToVisibilityMultipleValuesConverter"/>
  <spreadsheetControls:NumberOfRecordsToVisibilityConverter x:Key="NumberOfRecordsToVisibilityConverter"/>
  <Style x:Key="LinkButtonStyle" TargetType="Button">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="presenter">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="decorator">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>Hand</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="presenter" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
            <TextBlock x:Name="decorator" Foreground="#FF4CCEFF" TextDecorations="Underline" Visibility="Collapsed" Text="{TemplateBinding Content}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <telerik:RadContextMenu x:Key="RadSpreadsheetDefaultContextMenu" x:Shared="False" InheritDataContext="False">
    <telerik:RadMenuItem Header="Cut" Command="{Binding Path=CommandDescriptors.Cut.Command}" Visibility="{Binding Path=CommandDescriptors.Cut.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/cut.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Copy" Command="{Binding Path=CommandDescriptors.Copy.Command}" Visibility="{Binding Path=CommandDescriptors.Copy.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/copy.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Paste" Command="{Binding Path=CommandDescriptors.Paste.Command}" Visibility="{Binding Path=CommandDescriptors.Paste.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert..." Command="{Binding Path=CommandDescriptors.InsertCells.Command}" Visibility="{Binding Path=CommandDescriptors.InsertCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete..." Command="{Binding Path=CommandDescriptors.RemoveCells.Command}" Visibility="{Binding Path=CommandDescriptors.RemoveCells.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Rows" Command="{Binding Path=CommandDescriptors.ContextMenuInsertRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Rows" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Insert Columns" Command="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuInsertColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Delete Columns" Command="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuRemoveColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="Clear Contents"
            Command="{Binding Path=CommandDescriptors.Clear.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.Clear.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem
            Header="New Comment"
            Command="{Binding Path=CommandDescriptors.AddComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Comment"
            Command="{Binding Path=CommandDescriptors.RemoveComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/deleteComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Reply to Comment"
            Command="{Binding Path=CommandDescriptors.ReplyComment.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ReplyComment.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Comments/newComment.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="New Note"
            Command="{Binding Path=CommandDescriptors.AddNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.AddNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/newNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Edit Note"
            Command="{Binding Path=CommandDescriptors.EditNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.EditNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/editNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Delete Note"
            Command="{Binding Path=CommandDescriptors.RemoveNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.RemoveNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/deleteNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem
            Header="Show/Hide Note"
            Command="{Binding Path=CommandDescriptors.ShowHideNote.Command}"
            CommandParameter="Contents"
            Visibility="{Binding Path=CommandDescriptors.ShowHideNote.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/Notes/showHideNote.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuSeparatorItem Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.Command}" Header="Format Cells..." Visibility="{Binding Path=CommandDescriptors.ShowFormatCellsDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatCells.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideColumns.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Hide" Command="{Binding Path=CommandDescriptors.ContextMenuHideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuHideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Header="Unhide" Command="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.Command}" Visibility="{Binding Path=CommandDescriptors.ContextMenuUnhideRows.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.Command}" Header="Hyperlink..." Visibility="{Binding Path=CommandDescriptors.ShowHyperlinkDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/insertHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.RemoveHyperlink.Command}" Header="Remove Hyperlink" Visibility="{Binding Path=CommandDescriptors.RemoveHyperlink.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/removeHyperlink.png, IconSources={StaticResource IconPaths}}" Width="16"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringForward.Command}" Header="Bring Forward" Visibility="{Binding Path=CommandDescriptors.BringForward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringForward.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.BringToFront.Command}" Header="Bring To Front" Visibility="{Binding Path=CommandDescriptors.BringToFront.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/bringToFront.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendBackward.Command}" Header="Send Backward" Visibility="{Binding Path=CommandDescriptors.SendBackward.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendBackwards.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.SendToBack.Command}" Header="Send To Back" Visibility="{Binding Path=CommandDescriptors.SendToBack.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/sendToBack.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
    <telerik:RadMenuItem Command="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.Command}" Header="Format Picture..." Visibility="{Binding Path=CommandDescriptors.ShowFormatShapesDialog.IsEnabled, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
      <telerik:RadMenuItem.Icon>
        <Image Source="{telerik:IconResource IconRelativePath=16/formatShapes.png, IconSources={StaticResource IconPaths}}" Width="16" Stretch="None"/>
      </telerik:RadMenuItem.Icon>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
  <ControlTemplate x:Key="RadButtonTemplate" TargetType="telerik1:RadButton">
    <Grid>
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                  ContentStringFormat="{TemplateBinding ContentStringFormat}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>

      <!-- background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsBackgroundVisible" Value="False"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
      </MultiTrigger>

      <!-- General IsKeyboardFocused setters -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
          <Condition Property="IsMouseOver" Value="False"/>
          <Condition Property="IsPressed" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>

      <!-- general setters for IsMouseOver -->
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>

      <!-- general setters for IsPressed -->
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>

      <!-- disabled -->
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>

      <!-- disabled & background is hidden -->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsBackgroundVisible" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="Transparent"/>
        <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="Transparent"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RadButtonTemplate}"/>
  </Style>
  <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
  <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True">
            <ContentPresenter.RenderTransform>
              <TranslateTransform/>
            </ContentPresenter.RenderTransform>
          </ContentPresenter>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource RepeatButtonTemplate}"/>
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
  <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    <Grid UseLayoutRounding="True">
      <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid Margin="{TemplateBinding helpers:ThemeHelper.FocusVisualMargin}">
        <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" MinHeight="{TemplateBinding MinHeight}" MinWidth="{TemplateBinding MinWidth}">
          <Border x:Name="BorderVisual"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          <ContentPresenter x:Name="Content"
                  TextBlock.Foreground="{TemplateBinding Foreground}"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  RecognizesAccessKey="True"/>
        </Grid>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsKeyboardFocused" Value="True"/>
          <Condition Property="IsEnabled" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush)}"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBrush)}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
        <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="{telerik1:Windows11Resource ResourceKey=FocusVisualMargin}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=PressedBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=ButtonBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentControl x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                    FocusVisualStyle="{x:Null}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}">
              <ScrollViewer x:Name="ScrollViewer"
                      BorderBrush="{x:Null}"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
  <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  <Style x:Key="MenuScrollButton" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Interval" Value="50"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="ClickMode" Value="Hover"/>
    <Setter Property="Focusable" Value="False"/>
  </Style>
  <Style x:Key="MenuScrollUpButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 0 0 1"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>
  <Style x:Key="MenuScrollDownButton" TargetType="RepeatButton" BasedOn="{StaticResource MenuScrollButton}">
    <Setter Property="BorderThickness" Value="0 1 0 0"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
  </Style>
  <Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="CanContentScroll" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid SnapsToDevicePixels="true">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Margin="{TemplateBinding Padding}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <RepeatButton
                    Grid.Row="0"
                    Style="{StaticResource MenuScrollUpButton}"
                    Command="{x:Static ScrollBar.LineUpCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronUp}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
            <RepeatButton
                    Grid.Row="2"
                    Style="{StaticResource MenuScrollDownButton}"
                    Command="{x:Static ScrollBar.LineDownCommand}"
                    helpers:ThemeHelper.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"
                    CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <RepeatButton.Content>
                <telerik:RadGlyph
                        HorizontalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronDown}"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                        VerticalAlignment="Center"
                        FontSize="12"/>
              </RepeatButton.Content>
              <RepeatButton.Visibility>
                <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
                  <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
                </MultiBinding>
              </RepeatButton.Visibility>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="PanningMode" Value="None"/>
  </Style>
  <ControlTemplate x:Key="MenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid x:Name="RootElement" Margin="4 2">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="RoleStates">
          <VisualState x:Name="TopLevelItem">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TopLevelHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="IconHost" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-2 0 -7 0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="SubmenuItem"/>
          <VisualState x:Name="SubmenuHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Separator"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="Horizontal"/>
          <VisualState x:Name="Vertical">
            <Storyboard>
              <DoubleAnimation To="1" Duration="0:0:0" Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="HorizontalOffset"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ChildrenStates">
          <VisualState x:Name="HasChildren"/>
          <VisualState x:Name="NoChildren"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="VisibleHeader"/>
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputGestureTextStates">
          <VisualState x:Name="EmptyInputGestureText"/>
          <VisualState x:Name="VisibleInputGestureText">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_InputGestureText" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="BorderVisual"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
      <Grid x:Name="ContentGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="IconHost" Width="{TemplateBinding IconColumnWidth}" Margin="0">
          <ContentPresenter x:Name="CheckedIcon"
                  Visibility="Collapsed"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  Content="{TemplateBinding CheckedIcon}"
                  ContentTemplate="{TemplateBinding CheckedIconTemplate}"/>
          <ContentPresenter x:Name="Icon" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
        </Grid>
        <ContentPresenter x:Name="Content"
                Grid.Column="1"
                Margin="{TemplateBinding Padding}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                ContentSource="Header"/>
        <telerik:SharedSizeContentPresenter x:Name="PART_InputGestureText"
                Grid.Column="2"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Visibility="Collapsed"
                SharedSizeGroupWidth="IGTColumn"
                Margin="5 6"
                Content="{TemplateBinding InputGestureText}"/>
        <telerik:SharedSizeContentPresenter HorizontalAlignment="Right" SharedSizeGroupWidth="ExpandIconColumn" Grid.Column="3">
          <Grid x:Name="ExpandIcon" Margin="8 0" Visibility="Collapsed">
            <telerik:RadGlyph x:Name="ExpandIconRight"
                    VerticalAlignment="Center"
                    FontSize="12"
                    Foreground="{telerik1:Windows11Resource ResourceKey=IconSecondaryBrush}"
                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
          </Grid>
        </telerik:SharedSizeContentPresenter>
      </Grid>
      <Popup x:Name="PART_Popup"
              HorizontalOffset="0"
              VerticalOffset="{telerik1:Windows11Resource ResourceKey=PopupOffset}"
              IsOpen="{TemplateBinding IsSubmenuOpen}"
              Focusable="False"
              AllowsTransparency="True">
        <Grid Margin="3 0 3 3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
          <Grid x:Name="PopupContentElement">
            <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
            <Border x:Name="PopupBorderVisual"
                    CornerRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="1">
              <Grid>
                <ScrollViewer x:Name="PART_ScrollViewer"
                        Style="{StaticResource MenuScrollViewer}"
                        telerik:SharedSizeScope.IsSharedSizeScope="True"
                        telerik:CornerRadiusHelper.ClipRadius="{Binding ElementName=BorderVisual, Path=CornerRadius}">
                  <ItemsPresenter Margin="0 2"/>
                </ScrollViewer>
              </Grid>
            </Border>
          </Grid>
        </Grid>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsHighlighted" Value="True"/>
          <Condition Property="IsSubmenuOpen" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
      </MultiTrigger>
      <Trigger Property="IsSubmenuOpen" Value="True">
        <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.PressedBackgroundBrush), Mode=OneWay}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="ExpandIconRight" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="CheckedIcon" Property="Opacity" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}"/>
        <Setter TargetName="Content" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="ExpandIconRight" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
        <Setter TargetName="CheckedIcon" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="Icon" Value="{x:Null}"/>
          <Condition Property="IconTemplate" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.Setters>
          <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
        </MultiTrigger.Setters>
      </MultiTrigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedIcon" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="GroupTemplate" TargetType="telerikNavigation:RadMenuGroupItem">
    <Border x:Name="BorderVisual"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="HeaderStates">
          <VisualState x:Name="EmptyHeader">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="VisibleHeader"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="Header" Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}" SnapsToDevicePixels="True"/>
        <ContentPresenter x:Name="Content"
                Margin="16 10"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                RecognizesAccessKey="True"
                TextBlock.FontFamily="{telerik1:Windows11Resource ResourceKey=FontFamily}"
                ContentSource="Header"/>
        <ScrollViewer x:Name="PART_ScrollViewer"
                Grid.Row="1"
                Margin="0"
                BorderThickness="0"
                Padding="0"
                Background="Transparent"
                HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                VerticalScrollBarVisibility="{Binding (ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                Focusable="False">
          <ItemsPresenter/>
        </ScrollViewer>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="SeparatorTemplate" TargetType="telerikNavigation:RadMenuItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OrientationStates">
          <VisualState x:Name="VerticalState"/>
          <VisualState x:Name="HorizontalState">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSeparator" Storyboard.TargetProperty="Visibility" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="HorizontalSeparator">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" HorizontalAlignment="Left" Width="{TemplateBinding IconColumnWidth}"/>
        <Grid Grid.ColumnSpan="2" Margin="0 1 0 2" Height="1">
          <Rectangle Height="1" VerticalAlignment="Bottom" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
        </Grid>
      </Grid>
      <Grid x:Name="VerticalSeparator" Visibility="Collapsed" Width="1" Margin="0">
        <Rectangle Width="1" HorizontalAlignment="Right" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
      </Grid>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="MenuTemplate" TargetType="telerikNavigation:RadMenu">
    <Grid>
      <Border
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
              CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ContextMenuTemplate" TargetType="telerikNavigation:RadContextMenu">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="PopupHostStates">
          <VisualState x:Name="Standalone"/>
          <VisualState x:Name="Hosted">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupContentElement" Storyboard.TargetProperty="Margin">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TemplateBorder" Storyboard.TargetProperty="BorderThickness">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="PopupContentElement" Margin="{TemplateBinding Padding}">
        <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
        <Border x:Name="TemplateBorder"
                CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
          <Grid>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Style="{StaticResource MenuScrollViewer}"
                    telerik:SharedSizeScope.IsSharedSizeScope="True"
                    telerik:CornerRadiusHelper.ClipRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <ItemsPresenter/>
              </Grid>
            </ScrollViewer>
          </Grid>
        </Border>
      </Grid>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="CheckedIconTemplate">
      <Setter.Value>
        <DataTemplate>
          <telerik:RadGlyph
                  Glyph="{StaticResource GlyphCheck}"
                  FontSize="12"
                  FlowDirection="LeftToRight"
                  Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}, Path=(TextBlock.Foreground)}"/>
        </DataTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadMenuItemStyle" TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Padding" Value="12 9 12 8"/>
    <Setter Property="Template" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTemplate}"/>
    <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{Binding Path=TopLevelHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{Binding Path=TopLevelItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{Binding Path=SubmenuHeaderTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{Binding Path=SubmenuItemTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="Role" Value="Separator">
        <Setter Property="Template" Value="{Binding Path=SeparatorTemplateKey, RelativeSource={RelativeSource Self}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="RadMenuGroupItemStyle" TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="telerik:SharedSizeScope.IsSharedSizeScope" Value="True"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template" Value="{StaticResource GroupTemplate}"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  </Style>
  <Style x:Key="RadMenuSeparatorItemStyle" TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}"/>
  </Style>
  <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <telerik:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False"/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template" Value="{StaticResource MenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadContextMenuStyle" TargetType="telerikNavigation:RadContextMenu">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="IconColumnWidth" Value="22"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource ContextMenuTemplate}"/>
    <Setter Property="animation:AnimationManager.AnimationSelector">
      <Setter.Value>
        <animation:AnimationSelector>
          <animation:SlideAnimation Direction="In" SlideMode="Top" AnimationName="Expand" TargetElementName="PopupContentElement"/>
        </animation:AnimationSelector>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikNavigation:RadMenuItem" BasedOn="{StaticResource RadMenuItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuGroupItem" BasedOn="{StaticResource RadMenuGroupItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenuSeparatorItem" BasedOn="{StaticResource RadMenuSeparatorItemStyle}"/>
  <Style TargetType="telerikNavigation:RadMenu" BasedOn="{StaticResource RadMenuStyle}"/>
  <Style TargetType="telerikNavigation:RadContextMenu" BasedOn="{StaticResource RadContextMenuStyle}"/>
  <Style x:Key="DragVisualStyle" TargetType="telerikDragDrop:DragVisual">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="16 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Border x:Name="SecondItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ThirdthItemVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsDraggingMultipleItems, Converter={StaticResource BooleanToVisibilityConverter}}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Margin="2"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="DragBackgroundVisual"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border Padding="{TemplateBinding BorderThickness}">
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik1:RadGlyph x:Name="NoneEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCancel}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=ValidationBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="MoveEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowRight}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="CopyEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphPlus}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="LinkEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphLinkHorizontal}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <telerik1:RadGlyph x:Name="ScrollEffect"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowsKpi}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        Foreground="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"
                        Margin="0 0 8 0"/>
                <ContentPresenter x:Name="Content"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move, Scroll">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll, Copy, Move">
              <Setter TargetName="MoveEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Copy, Scroll">
              <Setter TargetName="CopyEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Link">
              <Setter TargetName="LinkEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="Effects" Value="Scroll">
              <Setter TargetName="ScrollEffect" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikDragDrop:DragVisual" BasedOn="{StaticResource DragVisualStyle}"/>
  <Style x:Key="RadListBoxItemStyle" TargetType="telerik1:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusInnerBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:Windows11Resource ResourceKey=FocusBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="11 6"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBoxItem">
          <Grid Background="#01FFFFFF">
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual" Style="{StaticResource FocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}" Margin="0"/>
            <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}">
              <Rectangle.RenderTransform>
                <ScaleTransform x:Name="PillTransform" ScaleY="1"/>
              </Rectangle.RenderTransform>
            </Rectangle>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
          <ControlTemplate.Triggers>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocused" Value="True">
              <Setter Property="Opacity" Value="1" TargetName="FocusVisual"/>
              <Setter Property="BorderThickness" Value="3"/>
            </Trigger>

            <!-- Focused & MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="FocusVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
            </MultiTrigger>

            <!-- Disabled -->
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Value="{telerik1:Windows11Resource ResourceKey=DisabledOpacity}" Property="Opacity"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- IsSelected general setters -->
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBrush), Mode=OneWay}"/>
            </Trigger>

            <!-- Selected and animation enabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="True"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <MultiTrigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseOut"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.EnterActions>
              <MultiTrigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="0:0:.3">
                      <DoubleAnimation.EasingFunction>
                        <SineEase EasingMode="EaseIn"/>
                      </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                    <DoubleAnimation Storyboard.TargetName="Pill" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:.3"/>
                  </Storyboard>
                </BeginStoryboard>
              </MultiTrigger.ExitActions>
            </MultiTrigger>

            <!-- Selected and animation disabled -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
                <Condition Property="IsSelected" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </MultiTrigger>

            <!-- Selected and MouseOver -->
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Windows11Resource ResourceKey=SelectedMouseOverBrush}"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ListBoxDragVisualStyle" TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource DragVisualStyle}">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=AccentControlForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Margin" Value="16 0 0 0"/>
    <Setter Property="Padding" Value="12 4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikDragDrop:DragVisual">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Border x:Name="DragBackgroundVisual"
                      Grid.ColumnSpan="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <telerik1:RadGlyph
                      Glyph="{StaticResource GlyphCancel}"
                      x:Name="NoneEffect"
                      Foreground="{TemplateBinding Foreground}"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Margin="16 0 0 0"/>
              <ItemsControl
                      ItemsSource="{Binding DraggedItemsStrings}"
                      Grid.Column="1"
                      Margin="{TemplateBinding Padding}"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <Grid x:Name="lowerGrid" Grid.Row="1" Margin="0 2 0 0">
              <Border
                      BorderThickness="1"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik1:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                      CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
              <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertUp}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Margin="0 0 8 0"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=Before}"/>
                <telerik1:RadGlyph
                        Glyph="{StaticResource GlyphInsertDown}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Foreground="{telerik1:Windows11Resource ResourceKey=IconBrush}"
                        Margin="0 0 8 0"
                        Visibility="{Binding DropPosition, Converter={StaticResource DragDropBooleanToVisibilityConverter}, ConverterParameter=After}"/>
                <TextBlock Text="{Binding DropPosition}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text=":" Margin="1 0 3 0" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <TextBlock Text="{Binding DropItemString}" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </StackPanel>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Effects" Value="None">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Visible"/>
              <Setter TargetName="lowerGrid" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Effects" Value="Move">
              <Setter TargetName="NoneEffect" Property="Visibility" Value="Collapsed"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadListBoxStyle" TargetType="telerik1:RadListBox">
    <Setter Property="telerik1:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>

    <!-- ScrollStep should be at least the ActualHeight of the ListBoxItem when scrolling is item based. -->
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
    <Setter Property="telerik1:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.05"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik1:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel/>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik1:RadListBox">
          <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <ScrollViewer x:Name="PART_ScrollViewer"
                      IsTabStop="False"
                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                      helpers:ThemeHelper.CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                      Padding="{TemplateBinding Padding}"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{x:Null}"
                      Margin="0"
                      BorderThickness="0">
                <ScrollViewer.InputBindings>
                  <KeyBinding Command="telerikPrimitives:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                </ScrollViewer.InputBindings>
                <ItemsPresenter/>
              </ScrollViewer>
            </Border>
            <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik1:RadListBox" BasedOn="{StaticResource RadListBoxStyle}"/>
  <Style TargetType="telerik1:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"/>
  <Style TargetType="telerikDragDrop:ListBoxDragVisual" BasedOn="{StaticResource ListBoxDragVisualStyle}"/>
  <Style x:Key="RadColorPaletteViewItemStylePredefined" TargetType="telerik:RadColorPaletteViewItem">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="2 0"/>
    <Setter Property="Content" Value="Color"/>
    <Setter Property="Color" Value="Green"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" Fill="{TemplateBinding Content}" Stretch="Fill" ToolTipService.ToolTip="{Binding}" MinWidth="11" MinHeight="11"/>
            <Border x:Name="borderContent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="13" MinHeight="13"/>
            <Border x:Name="border"
                    BorderBrush="{telerik:Windows11Resource ResourceKey=AccentMouseOverBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed"
                    VerticalAlignment="Stretch"
                    MinWidth="13"
                    MinHeight="13"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DefaultStylePredefined" TargetType="telerik:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStylePredefined}">
    <Setter Property="Color" Value="Black"/>
  </Style>
  <Style x:Key="RadColorSelectorStylePredefined" TargetType="telerik:RadColorSelector">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey= PrimarySolidBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="280"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadColorSelector">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Button x:Name="PaletteHeader"
                      Content="{TemplateBinding NoColorText}"
                      Tag="{Binding AutomaticColor, Converter={StaticResource converter}, RelativeSource={RelativeSource TemplatedParent}}"
                      Width="0"
                      Height="0"
                      Visibility="Collapsed"/>
              <telerik:RadColorPaletteView x:Name="HeaderPalette"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 -3">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <telerik:RadColorPaletteView x:Name="MainPalette"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Background="{TemplateBinding Background}"
                      ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                      Margin="0 5 0 2"
                      Grid.Row="3"/>
              <Border x:Name="StandardPaletteBorder" Grid.Row="4" Margin="0 2 0 3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="0"/>
              <telerik:RadColorPaletteView x:Name="StandartPalette"
                      Grid.Row="5"
                      VerticalAlignment="Center"
                      Background="{TemplateBinding Background}"
                      BorderBrush="Transparent"
                      BorderThickness="0"
                      Margin="0 0 0 1">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="RecentColorsPaletteBorder" Grid.Row="6" Visibility="Collapsed" Margin="0 2 0 3" BorderThickness="0 0 0 1">
                <TextBlock
                        Margin="10 2 2 2"
                        x:Name="RecentColorsPaletteHeader"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        Text="{TemplateBinding RecentColorsHeaderText}"/>
              </Border>
              <telerik:RadColorPaletteView x:Name="RecentColorsPalette"
                      Grid.Row="7"
                      Margin="0 0 0 1"
                      BorderThickness="0"
                      Background="Transparent"
                      BorderBrush="Transparent"
                      Visibility="Collapsed"
                      ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                      VerticalAlignment="Center"
                      MinHeight="14">
                <telerik:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                  </ItemsPanelTemplate>
                </telerik:RadColorPaletteView.ItemsPanel>
              </telerik:RadColorPaletteView>
              <Border x:Name="AdditionalContentBorder" Grid.Row="8" Visibility="Collapsed" Margin="0 1 0 0" BorderBrush="Transparent" BorderThickness="0">
                <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" TextElement.Foreground="{TemplateBinding Foreground}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSelectorDropDownStyle" TargetType="spreadsheetControls:ColorSelectorDropDown">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Padding" Value="2 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorSelectorDropDown">
          <telerik:RadDropDownButton x:Name="ColorButton"
                  IsTabStop="False"
                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                  Padding="{TemplateBinding Padding}"
                  helpers:ThemeHelper.FocusVisualMargin="0">
            <telerik:RadDropDownButton.Content>
              <Grid x:Name="ContentContainer">
                <Border x:Name="ColorRectangleBorder"
                        MinHeight="20"
                        BorderBrush="{x:Null}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="{TemplateBinding Padding}">
                  <Rectangle x:Name="ColorRectangle"
                          Stretch="Fill"
                          MinHeight="{Binding ElementName=ColorRectangleBorder, Path=MinHeight}"
                          Width="{Binding ElementName=ColorRectangleBorder, Path=ActualWidth}">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding ElementName=ColorSelector, Path=SelectedColor}"/>
                    </Rectangle.Fill>
                  </Rectangle>
                </Border>
              </Grid>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadColorSelector x:Name="ColorSelector"
                      AutomaticColor="{Binding Path=AutomaticColor, RelativeSource={RelativeSource TemplatedParent}}"
                      SelectedColor="Black"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteItemsSource="{Binding Path=MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                      MainPaletteOrientation="{Binding Path=MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                      BorderThickness="0">
                <telerik:RadColorSelector.AdditionalContent>
                  <telerik:RadButton x:Name="MoreColorsButton" HorizontalContentAlignment="Left" BorderThickness="0" Background="Transparent" Grid.Row="6" IsTabStop="False">
                    <StackPanel Orientation="Horizontal">
                      <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/color.png" Width="16" Height="16"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                              Margin="10 0 0 0"
                              FontWeight="Normal"
                              Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                    </StackPanel>
                  </telerik:RadButton>
                </telerik:RadColorSelector.AdditionalContent>
              </telerik:RadColorSelector>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadHexagonColorPickerStyle" TargetType="spreadsheetControls:RadHexagonColorPicker">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadHexagonColorPicker">
          <Canvas x:Name="PART_FullColorCanvas" Background="{TemplateBinding Background}" Width="220" Height="253"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HexagonItemStyle" TargetType="spreadsheetControls:HexagonItem">
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="telerikDragDrop:DragDropManager.AllowDrag" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:HexagonItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="0:0:0.15">
                    <VisualTransition.GeneratedEasingFunction>
                      <CircleEase EasingMode="EaseOut"/>
                    </VisualTransition.GeneratedEasingFunction>
                  </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Initial"/>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Polygon">
                      <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1.4"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Polygon x:Name="PART_Polygon" RenderTransformOrigin="1 1">
              <Polygon.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Polygon.RenderTransform>
            </Polygon>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:ColorSelectorDropDown" BasedOn="{StaticResource ColorSelectorDropDownStyle}"/>
  <Style TargetType="spreadsheetControls:RadHexagonColorPicker" BasedOn="{StaticResource RadHexagonColorPickerStyle}"/>
  <Style TargetType="spreadsheetControls:HexagonItem" BasedOn="{StaticResource HexagonItemStyle}"/>
  <Style x:Key="CommentButtonBaseStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="MinWidth" Value="42"/>
  </Style>
  <Style x:Key="CommentReplyButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource CommentButtonBaseStyle}">
    <Setter Property="IsBackgroundVisible" Value="True"/>
  </Style>
  <Style x:Key="CommentOptionsButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Cursor" Value="Hand"/>
  </Style>
  <Style x:Key="CommentsTaskPaneThreadItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="Padding" Value="0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="contentPresenter"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="CommentEntryItemTemplate">
    <Border x:Name="BorderVisual" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" BorderThickness="0 1 0 0">
      <Grid x:Name="LayoutRootGrid">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="44"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border Grid.Column="0" CornerRadius="14" Width="28" Height="28" Margin="8 4" Background="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}">
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding AuthorInitials}"/>
          </Border>
          <TextBlock Grid.Column="1" Text="{Binding AuthorName}" Margin="0 10"/>
          <TextBlock
                  Grid.Column="2"
                  Visibility="{Binding IsCommentSpecific, Converter={StaticResource BoolToVisibilityValueConverter}}"
                  Margin="5 10"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Right"
                  Text="{Binding CellName}"/>
          <Grid Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0">
            <telerik:RadDropDownButton x:Name="OptionsButton"
                    IsOpen="{Binding IsOptionsDropDownOpen, Mode=TwoWay}"
                    DropDownIndicatorVisibility="Collapsed"
                    AutoOpenDelay="0:0:0.0"
                    Style="{StaticResource CommentOptionsButtonStyle}">
              <telerik:RadDropDownButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="IsCommentInCreationState" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                </MultiBinding>
              </telerik:RadDropDownButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphMoreVertical}" Foreground="{Binding ElementName=OptionsButton, Path=Foreground}"/>
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenu Orientation="Vertical" BorderThickness="0" Background="{x:Null}" Padding="0">
                  <telerik:RadMenuItem Header="Delete Thread" Command="{Binding DeleteThreadCommand}"/>
                  <telerik:RadMenuItem Header="Resolve Thread" Command="{Binding ResolveThreadCommand}"/>
                </telerik:RadMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerik:RadButton x:Name="DeleteThreadButton" Command="{Binding CancelClickCommand}" Style="{StaticResource CommentButtonBaseStyle}" MinWidth="0">
              <telerik:RadButton.Visibility>
                <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                  <Binding Path="IsCommentSpecific"/>
                  <Binding Path="IsCommentInCreationState"/>
                </MultiBinding>
              </telerik:RadButton.Visibility>
              <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
            </telerik:RadButton>
          </Grid>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 10 0" Visibility="{Binding IsCommentInCreationState, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
          <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
          </Grid.RowDefinitions>
          <Grid Margin="0 0 0 5" HorizontalAlignment="Stretch">
            <TextBox x:Name="PART_CommentTextBox"
                    Text="{Binding Text, UpdateSourceTrigger=LostFocus}"
                    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MaxLines="5"
                    IsReadOnly="{Binding IsReadOnly}"/>
            <Grid Visibility="{Binding ElementName=PART_CommentTextBox, Path=IsReadOnly, Converter={StaticResource BooleanToVisibilityConverter}}">
              <TextBlock x:Name="PreviewTb"
                      Text="{Binding ElementName=PART_CommentTextBox, Path=Text}"
                      TextWrapping="Wrap"
                      TextTrimming="CharacterEllipsis"
                      Width="{Binding ElementName=PART_CommentTextBox, Path=ActualWidth}"
                      Height="{Binding ElementName=PART_CommentTextBox, Path=ActualHeight}"/>
              <telerik:RadToggleButton x:Name="ExpandButton" MinHeight="0" MinWidth="0" Cursor="IBeam">
                <telerik:RadToggleButton.Template>
                  <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border Background="Transparent"/>
                  </ControlTemplate>
                </telerik:RadToggleButton.Template>
              </telerik:RadToggleButton>
            </Grid>
          </Grid>
          <TextBlock Grid.Row="1" Text="{Binding CreationDate}" Margin="0 0 0 10" Visibility="{Binding IsInEditMode, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
          <Grid x:Name="ActionButtonsPanel"
                  Grid.Row="2"
                  HorizontalAlignment="Right"
                  Margin="0 0 0 5"
                  Visibility="{Binding IsCommentResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"
                  Opacity="0">
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="EditButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding EditClickCommand}"
                      Content="Edit"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="DeleteButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding DeleteThreadCommand}"
                      Content="Delete"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsReplySpecific"/>
                    <Binding Path="IsInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsCommentResolved" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="HasAnotherPendingComment" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
              <telerik:RadButton x:Name="SaveButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding SaveClickCommand}"
                      Content="Save"
                      Margin="0 0 4 0"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
              <telerik:RadButton x:Name="CancelButton"
                      MinWidth="{StaticResource CommentActionButtonMinWidth}"
                      IsBackgroundVisible="False"
                      Command="{Binding CancelClickCommand}"
                      Content="Cancel"
                      Cursor="Hand">
                <telerik:RadButton.Visibility>
                  <MultiBinding Converter="{StaticResource BoolToVisibilityMultipleValuesConverter}">
                    <Binding Path="IsAnotherCommentReplyInEditMode" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                    <Binding Path="IsInEditMode"/>
                    <Binding Path="AreAllButtonsCollapsed" Converter="{StaticResource BooleanToInversedBooleanConverter}"/>
                  </MultiBinding>
                </telerik:RadButton.Visibility>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </Grid>
      </Grid>
    </Border>
    <DataTemplate.Triggers>

      <!-- Opening comment -->
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="True"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=IsComment}" Value="False"/>
          <Condition Binding="{Binding Path=IsCommentResolved}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="BorderVisual" Property="Opacity" Value="0.3"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding IsCommentResolved}" Value="True"/>
          <Condition Binding="{Binding IsCommentVisible}" Value="False"/>
        </MultiDataTrigger.Conditions>
        <Setter TargetName="OptionsButton" Property="IsOpen" Value="False"/>
      </MultiDataTrigger>
      <Trigger SourceName="PART_CommentTextBox" Property="IsReadOnly" Value="True">
        <Setter TargetName="PART_CommentTextBox" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger SourceName="ExpandButton" Property="IsChecked" Value="True">
        <Setter TargetName="PreviewTb" Property="Height" Value="Auto"/>
        <Setter TargetName="ExpandButton" Property="IsHitTestVisible" Value="False"/>
      </Trigger>
      <Trigger SourceName="OptionsButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="OptionsButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="OptionsButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteThreadButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteThreadButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteThreadButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="EditButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="EditButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="EditButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="DeleteButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="DeleteButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="DeleteButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="SaveButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="SaveButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="SaveButton" Property="Width" Value="0"/>
      </Trigger>
      <Trigger SourceName="CancelButton" Property="Visibility" Value="Hidden">
        <Setter TargetName="CancelButton" Property="MinWidth" Value="0"/>
        <Setter TargetName="CancelButton" Property="Width" Value="0"/>
      </Trigger>
      <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
        <Setter TargetName="ActionButtonsPanel" Property="Opacity" Value="1"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>
  <Style x:Key="CommentControlStyle" TargetType="spreadsheetControls:CommentControl">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentControl">
          <Grid>
            <Polygon x:Name="PurpleTriangle"
                    Points="{Binding PurpleTrianglePoints}"
                    Fill="{StaticResource CommentIndicatorBrush}"
                    Visibility="{Binding IsPurpleTriangleVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Visibility="{Binding IsCommentVisible, Converter={StaticResource BoolToVisibilityValueConverter}}" Width="{StaticResource CommentMinWidth}" MinHeight="{StaticResource CommentMinHeight}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="CommentEntriesScrollViewer"
                        MaxHeight="{StaticResource CommentListMaxHeight}"
                        Background="{x:Null}"
                        BorderThickness="0"
                        Padding="0"
                        Margin="0"
                        HorizontalScrollBarVisibility="Disabled">
                  <Grid>
                    <ItemsControl
                            ItemsSource="{Binding CommentEntriesViewModels}"
                            ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            Margin="0 -1 0 0"/>
                  </Grid>
                </ScrollViewer>
                <Border Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <Grid Margin="10">
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                      <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                      </Grid.RowDefinitions>
                      <TextBox
                              Name="PART_ReplyTextBox"
                              Grid.Row="0"
                              Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              TextWrapping="Wrap"
                              AcceptsReturn="True"
                              MaxLines="5"
                              IsEnabled="{Binding IsReplyTextBoxEnabled}">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                          <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                      </TextBox>
                      <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                        <telerik:RadButton x:Name="SendButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding SendClickCommand}" IsEnabled="{Binding HasAnyEnteredText}" Margin="0 0 4 0">
                          <Path
                                  Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                  Width="14"
                                  Height="11"
                                  Stretch="Fill"/>
                        </telerik:RadButton>
                        <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Command="{Binding CancelClickCommand}">
                          <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                        </telerik:RadButton>
                      </StackPanel>
                    </Grid>
                    <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                        <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      </StackPanel>
                    </Grid>
                  </Grid>
                </Border>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsCommentVisible}" Value="False">
              <Setter Property="BorderThickness" Value="0"/>
            </DataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="spreadsheetControls:CommentControl" BasedOn="{StaticResource CommentControlStyle}"/>
  <Style x:Key="GalleryHeaderItemBaseStyle" TargetType="ContentControl">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12 6"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ContentControl">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryHeaderItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="GalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}"/>
  <Style x:Key="PatternFillControlStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="GradientFillControlStyle" TargetType="spreadsheetControls:GradientFillControl">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:GradientFillControl">
          <Canvas x:Name="Container" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpreadsheetGridSplitterStyle" TargetType="spreadsheetControls:SpreadsheetGridSplitter">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Cursor" Value="SizeWE"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SpreadsheetGridSplitter">
          <Grid>
            <worksheetMargins:ResizeThumb x:Name="Thumb"
                    Width="{TemplateBinding Width}"
                    Height="{TemplateBinding Height}"
                    Foreground="{TemplateBinding Foreground}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}">
              <worksheetMargins:ResizeThumb.Template>
                <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
                  <Grid>
                    <Thumb x:Name="PART_Thumb"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}">
                      <Thumb.Template>
                        <ControlTemplate>
                          <Border
                                  Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
                                  BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
                                  Height="{Binding Height,RelativeSource={RelativeSource TemplatedParent}}"
                                  Width="{Binding Width,RelativeSource={RelativeSource TemplatedParent}}">
                            <StackPanel Margin="{Binding Padding,RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding VerticalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="{Binding HorizontalContentAlignment,RelativeSource={RelativeSource TemplatedParent}}">
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}" Margin="0 2"/>
                              <Rectangle Width="2" Height="2" Fill="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"/>
                            </StackPanel>
                          </Border>
                        </ControlTemplate>
                      </Thumb.Template>
                    </Thumb>
                  </Grid>
                </ControlTemplate>
              </worksheetMargins:ResizeThumb.Template>
            </worksheetMargins:ResizeThumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStyle" TargetType="telerikControls:RadSpreadsheet">
    <Setter Property="WorksheetEditorContextMenu" Value="{StaticResource ResourceKey=RadSpreadsheetDefaultContextMenu}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="SelectionFill" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="SelectionStroke" Value="Black"/>
    <Setter Property="SelectionStrokeThickness" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikControls:RadSpreadsheet">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition x:Name="PART_CommentsTaskPaneColumnDefinition" Width="Auto" MaxWidth="{StaticResource CommentsTaskPaneMaxWidth}"/>
            </Grid.ColumnDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="PART_PrintContentContainer"
                      Opacity="0"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <ContentControl x:Name="ContentPresenter"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
              <Grid Grid.Row="1" Grid.Column="0" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="6*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="4*"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:RadSpreadsheetSheetSelector x:Name="SheetSelector" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}" Height="40" AreSheetTabItemsOverlapping="False"/>
                <Rectangle Height="1" VerticalAlignment="Top" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Grid.Column="1" Grid.ColumnSpan="2"/>
                <spreadsheetControls:SpreadsheetGridSplitter x:Name="splitter"
                        Grid.Column="1"
                        Width="10"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Center"
                        Visibility="{Binding Path=(spreadsheetControls:RadSpreadsheetSheetSelector.IsSheetSelectorVisible), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"
                        Margin="0 1 0 0"/>
                <ScrollBar x:Name="HorizontalScrollBar"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        SmallChange="16"
                        LargeChange="320"
                        Minimum="0"
                        Orientation="Horizontal"
                        Margin="0"/>
              </Grid>
              <Border Grid.Column="1" Background="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 0"/>
              <ScrollBar x:Name="VerticalScrollBar" Grid.Row="0" Grid.Column="1" IsTabStop="False" SmallChange="16" LargeChange="320" Minimum="0" Orientation="Vertical"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=AlternativeBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Width="1" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
            </Grid>
            <GridSplitter
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Background="{Binding Background, ElementName=TaskPane}"
                    BorderBrush="{Binding BorderBrush, ElementName=TaskPane}"
                    BorderThickness="{Binding BorderThickness, ElementName=TaskPane, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopBottom}"
                    Visibility="{Binding Visibility, ElementName=TaskPane}"/>
            <spreadsheetControls:TaskPane x:Name="TaskPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
              <spreadsheetControls:TaskPane.Content>
                <spreadsheetControls:CommentsTaskPaneContent x:Name="CommentsTaskPaneContent" RadSpreadsheet="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
              </spreadsheetControls:TaskPane.Content>
            </spreadsheetControls:TaskPane>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NormalWorksheetEditorPresenterStyle" TargetType="worksheet:NormalWorksheetEditorPresenter">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:NormalWorksheetEditorPresenter">
          <Grid>
            <ContentControl x:Name="ContentPresenter"
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    Focusable="False"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WorksheetPrintPresenterStyle" TargetType="worksheet:WorksheetPrintPresenter">
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:WorksheetPrintPresenter">
          <Grid>
            <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="2"
                      Grid.Column="2"
                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectAllControlStyle" TargetType="worksheetMargins:SelectAllControl">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:SelectAllControl">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalFillBrush}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.3"/>
            <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}" Margin="1"/>
            <Rectangle x:Name="PART_TopRectangle" Margin="4" Fill="{TemplateBinding Foreground}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadWorksheetEditorStyle" TargetType="worksheet:RadWorksheetEditor">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:RadWorksheetEditor">
          <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="RowColumnHeadingMarginsStates">
                <VisualState x:Name="VisibleHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HiddenHeadings">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectAllControl" Storyboard.TargetProperty="(worksheetMargins:SelectAllControl.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftMarginsPanel" Storyboard.TargetProperty="(StackPanel.Visibility)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadWorksheetEditorBorder" Storyboard.TargetProperty="(Border.BorderThickness)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>1 1 0 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <worksheetMargins:SelectAllControl x:Name="SelectAllControl" AssociatedWorksheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            <StackPanel x:Name="TopMarginsPanel"
                    Grid.Column="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
            <StackPanel x:Name="LeftMarginsPanel" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
            <Border x:Name="RadWorksheetEditorBorder"
                    Grid.Row="1"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch">
              <ContentControl x:Name="ContentPresenter"
                      Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      IsTabStop="False"
                      Focusable="False"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ResizeThumbStyle" TargetType="worksheetMargins:ResizeThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:ResizeThumb">
          <Grid>
            <Thumb x:Name="PART_Thumb">
              <Thumb.Template>
                <ControlTemplate>
                  <Rectangle Fill="Transparent"/>
                </ControlTemplate>
              </Thumb.Template>
            </Thumb>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideThumbStyle" TargetType="worksheetMargins:UnhideThumb">
    <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:UnhideThumb">
          <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
              <Thumb x:Name="PART_Thumb" Background="Transparent">
                <Thumb.Template>
                  <ControlTemplate>
                    <Rectangle Fill="Transparent"/>
                  </ControlTemplate>
                </Thumb.Template>
              </Thumb>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="rowColumnheadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase">
    <Setter Property="NormalFillBrush" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="HoverFillBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="SelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="FullySelectedFillBrush" Value="{StaticResource SelectionFillBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="RectangleStrokeThickness" Value=".3"/>
    <Setter Property="RectangleStrokeBrush" Value="{telerik:Windows11Resource ResourceKey=StrokeBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheetMargins:RowColumnHeadingBase">
          <Grid x:Name="Content" Background="{TemplateBinding NormalFillBrush}">
            <Rectangle x:Name="Rect"
                    MinWidth="25"
                    Stroke="{TemplateBinding RectangleStrokeBrush}"
                    StrokeThickness="{TemplateBinding RectangleStrokeThickness}"
                    Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Fill}"
                    SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5 0"/>
            <worksheetMargins:ResizeThumb x:Name="PART_FirstResizeThumb"/>
            <worksheetMargins:UnhideThumb x:Name="PART_UnhideThumb"/>
            <worksheetMargins:ResizeThumb x:Name="PART_SecondResizeThumb"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RowHeadingStyle" TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="ColumnHeadingStyle" TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Style.Triggers>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="Selected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="HeadingState" Value="FullySelected"/>
          <Condition Property="IsMouseOver" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
  <Style x:Key="printRowColumnHeadingBaseStyle" TargetType="worksheetMargins:RowColumnHeadingBase" BasedOn="{StaticResource rowColumnheadingBaseStyle}">
    <Setter Property="NormalFillBrush" Value="Transparent"/>
    <Setter Property="Fill" Value="Transparent"/>
    <Setter Property="RectangleStrokeBrush" Value="Black"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="RectangleStrokeThickness" Value="0.5"/>
  </Style>
  <Style x:Key="PrintRowHeadingStyle" TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="PrintColumnHeadingStyle" TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource printRowColumnHeadingBaseStyle}"/>
  <Style x:Key="CellEditorTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" Background="{TemplateBinding Background}">
              <ScrollViewer
                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                      Background="{TemplateBinding Background}"
                      Padding="{TemplateBinding Padding}"
                      BorderThickness="0"
                      IsTabStop="False"
                      Name="PART_ContentHost"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CellEditorStyle" TargetType="worksheet:CellEditor">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="worksheet:CellEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    Padding="{TemplateBinding Padding}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    Background="{TemplateBinding Background}"
                    Style="{StaticResource ResourceKey=CellEditorTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectorTabItemStyle" TargetType="spreadsheetControls:SheetSelectorTabItem">
    <Setter Property="DefaultBackground" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Margin" Value="-3 0 0 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SheetSelectorTabItem">
          <Grid x:Name="root" Margin="3 0 3 3" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedCellUpperIndicator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Margin">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0 1 -1 0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalBorder" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Separator" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Normal</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Edit">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBlock" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TabNameTextBox" Storyboard.TargetProperty="(TextElement.FontWeight)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="10"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="NormalBorder" Grid.ColumnSpan="3" Background="#01FFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"/>
            <Rectangle x:Name="Separator" Width="1" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="Transparent" Height="18" Margin="0 5 0 0"/>
            <Border x:Name="CurrentBackgroundBorder" Grid.ColumnSpan="3" Background="{Binding CurrentBackground}" Margin="0" MinWidth="74"/>
            <Border x:Name="SelectedBorder"
                    Grid.ColumnSpan="3"
                    Background="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1 0"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"/>
            <Border x:Name="PART_BorderCenterOuter" Grid.Column="1" Background="Transparent" BorderThickness="0 0 0 1" Margin="0 4 0 0">
              <Grid>
                <TextBlock x:Name="PART_TabNameTextBlock"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        TextAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"/>
                <TextBox x:Name="PART_TabNameTextBox"
                        Text="{Binding Path=SheetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        Foreground="Black"
                        Background="{Binding CurrentBackground}"
                        BorderThickness="0"
                        Visibility="Collapsed"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusBrush="{x:Null}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MaxLength="31"
                        Height="36"/>
                <Image x:Name="PART_Image"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="16"
                        Height="16"
                        UseLayoutRounding="True"
                        Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newSheet.png"/>
              </Grid>
            </Border>
            <Rectangle x:Name="SelectedCellIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="2"
                    RadiusX="2"
                    RadiusY="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
            <Rectangle x:Name="SelectedCellUpperIndicator"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    Height="1"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Top"
                    Fill="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                    Margin="0 1 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_Image" Property="Visibility" Value="Visible">
              <Setter TargetName="CurrentBackgroundBorder" Property="Background" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="SelectedBorder" Property="Visibility" Value="Visible">
              <Setter TargetName="PART_TabNameTextBlock" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition SourceName="SelectedBorder" Property="Visibility" Value="Collapsed"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="FontWeight" Value="SemiBold"/>
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetSelectionRadButtonStyle" TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="2 0"/>
  </Style>
  <Style x:Key="RadSpreadsheetSheetSelectorStyle" TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetSheetSelector">
          <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors}">
            <Rectangle Height="1" VerticalAlignment="Top" Fill="{TemplateBinding BorderBrush}"/>
            <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="10 -2 0 0">
              <telerik:RadButton x:Name="PART_GoToFirstButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowBackward}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToPreviousButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToNextButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
              </telerik:RadButton>
              <telerik:RadButton x:Name="PART_GoToLastButton" Style="{StaticResource SheetSelectionRadButtonStyle}">
                <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrowForward}"/>
              </telerik:RadButton>
              <ScrollViewer x:Name="PART_SheetTabItemsContainerScrollViewer"
                      BorderThickness="0"
                      Background="Transparent"
                      VerticalAlignment="Center"
                      HorizontalScrollBarVisibility="Hidden"
                      VerticalScrollBarVisibility="Hidden"
                      IsTabStop="False"
                      Focusable="False"
                      Margin="8 -3 0 0">
                <StackPanel Orientation="Horizontal" Name="PART_SheetTabItemsContainer" Height="36" VerticalAlignment="Top" Margin="0 -3 0 0">
                  <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="PART_ContextMenu" InheritDataContext="True">
                      <telerik:RadMenuItem
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Insert"
                              Command="{Binding Path=InsertSheet.Command, Mode=OneWay}"
                              CommandParameter="Worksheet"
                              IsEnabled="{Binding Path=InsertSheet.IsEnabled, Mode=TwoWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Delete" Command="{Binding Path=RemoveSheet.Command}" IsEnabled="{Binding Path=RemoveSheet.IsEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <Image Source="{telerik:IconResource IconRelativePath=SheetSelector/deleteSheet.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_Rename" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RenameSheetCommand, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SheetSelector_TabColor">
                        <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                          <telerik:RadColorSelector x:Name="PART_ColorSelector"
                                  HeaderPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource}"
                                  MainPaletteItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource}"
                                  MainPaletteOrientation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation}"
                                  RecentColorsVisibility="Visible"
                                  SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActiveTabItemColor, Mode=TwoWay}"
                                  Margin="-2"/>
                        </telerik:RadMenuGroupItem>
                      </telerik:RadMenuItem>
                      <telerik:RadMenuSeparatorItem/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Hide" Command="{Binding Path=HideSheet.Command, Mode=OneWay}" IsEnabled="{Binding Path=HideSheet.IsEnabled, Mode=OneWay}"/>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Unhide_Ellipsis" Command="{Binding Path=ShowUnhideSheetDialog.Command, Mode=OneWay}" IsEnabled="{Binding Path=ShowUnhideSheetDialog.IsEnabled, Mode=OneWay}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadContextMenu.ContextMenu>
                </StackPanel>
              </ScrollViewer>
            </StackPanel>
            <Canvas x:Name="PART_ImagesContainer" Margin="0 -50 0 0">
              <Image x:Name="PART_PageIcon"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetPage.png"
                      Visibility="Collapsed"
                      Canvas.Left="20"
                      Canvas.ZIndex="1000"/>
              <Image x:Name="PART_Arrow"
                      Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/SheetSelector/dragDropSheetArrow.png"
                      Visibility="Collapsed"
                      UseLayoutRounding="True"
                      SnapsToDevicePixels="True"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PrintPreviewControlStyle" TargetType="spreadsheetControls:PrintPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PrintPreviewControl">
          <Grid Margin="35 0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ViewModel}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="340"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" FontSize="36" Grid.ColumnSpan="2" Margin="0 25"/>
            <Grid Grid.Row="1">
              <StackPanel Margin="0 0 35 0">
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton Width="85" Height="85" Command="{Binding PrintCommand}" CommandParameter="{Binding PrintWhatSettings}">
                    <telerik:RadButton.Content>
                      <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=32/print.png, IconSources={StaticResource IconPaths}}" Stretch="None" Width="32"/>
                        <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}, Path=Foreground}" telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 2"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <StackPanel Orientation="Horizontal" Margin="10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Copies" VerticalAlignment="Center" Margin="10 0"/>
                    <telerik:RadNumericUpDown VerticalAlignment="Center" IsInteger="True" Minimum="1" Value="{Binding Copies, Mode=TwoWay}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Settings"
                        FontSize="24"
                        Margin="0 10"
                        Foreground="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
                <telerik:RadDropDownButton Margin="0 5 0 0" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageWhat" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintWhatModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintWhatModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintWhatDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_IgnorePrintArea" Command="{Binding SelectIgnorePrintAreaCommand}" IsEnabled="{Binding IsIgnorePrintAreaEnabled, Mode=TwoWay}">
                        <telerik:RadMenuItem.Icon>
                          <TextBlock Text="✔" Visibility="{Binding PrintWhatSettings.IgnorePrintArea, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
                        </telerik:RadMenuItem.Icon>
                      </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 3">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Pages" Margin="0 0 10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding FromPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_To" Margin="10 0" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown IsInteger="True" Minimum="1" Value="{Binding ToPage, Mode=TwoWay}" VerticalAlignment="Center" Width="110"/>
                </StackPanel>
                <telerik:RadDropDownButton Margin="0 2" HorizontalContentAlignment="Left" Padding="2" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPrintCollatedModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPrintCollatedModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PrintCollatedDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" AutomationProperties.AutomationId="btnPageOrientation" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Header="{Binding SelectedPageOrientationModel.Header}"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPageOrientationModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PageOrientationDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" Header="{Binding Header}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsPaperTypeDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedPaperTypeModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedPaperTypeModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding PaperTypeDropDownItems}" StaysOpenOnClick="False" MaxHeight="360" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Description}"/>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_MorePaperSizes" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsMarginsDropDownOpened, Mode=TwoWay}" DropDownWidth="275" MinHeight="46">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedMarginsModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedMarginsModel.Header}" Margin="0 0 0 3"/>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding SelectedMarginsModel.LeftMarginText}" Grid.Column="0" Opacity="0.7"/>
                            <TextBlock Text="{Binding SelectedMarginsModel.RightMarginText}" Grid.Column="1" Opacity="0.7"/>
                          </Grid>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding MarginsDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <StackPanel>
                                      <TextBlock Text="{Binding Header}" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Margin="0 0 0 3"/>
                                      <Grid>
                                        <Grid.RowDefinitions>
                                          <RowDefinition/>
                                          <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding TopMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding BottomMarginText}"
                                                Grid.Row="0"
                                                Grid.Column="1"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding LeftMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="0"/>
                                        <TextBlock
                                                Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                                Text="{Binding RightMarginText}"
                                                Grid.Row="1"
                                                Grid.Column="1"/>
                                      </Grid>
                                    </StackPanel>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomMargins" Command="{Binding ShowPageSetupDialogMarginsTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadDropDownButton Margin="0 2 0 3" HorizontalContentAlignment="Left" Padding="2" IsOpen="{Binding IsScalingDropDownOpened, Mode=TwoWay}" MinHeight="46" DropDownWidth="275">
                  <telerik:RadDropDownButton.Content>
                    <telerik:RadMenuItem
                            Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            IsHitTestVisible="False"
                            Padding="0"
                            IconColumnWidth="50">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{Binding SelectedScalingTypeDropDownModel.Icon}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <StackPanel>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Header}" Margin="0 0 0 3"/>
                          <TextBlock Text="{Binding SelectedScalingTypeDropDownModel.Description}" Opacity="0.7"/>
                        </StackPanel>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadDropDownButton.Content>
                  <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
                      <telerik:RadMenuGroupItem Margin="0 0 0 1" ItemsSource="{Binding ScalingTypeDropDownItems}" StaysOpenOnClick="False">
                        <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                          <spreadsheetUtilities:SingleTemplateSelector>
                            <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                              <DataTemplate>
                                <telerik:RadMenuItem MaxWidth="275" Command="{Binding Command}" CommandParameter="{Binding}" IconColumnWidth="50">
                                  <telerik:RadMenuItem.Icon>
                                    <Image Source="{Binding Icon}" Stretch="None"/>
                                  </telerik:RadMenuItem.Icon>
                                  <telerik:RadMenuItem.Header>
                                    <Grid>
                                      <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                      </Grid.RowDefinitions>
                                      <TextBlock Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}" Text="{Binding Header}" Margin="0 0 0 3"/>
                                      <TextBlock
                                              Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadMenuItem}}, Path=Foreground}"
                                              TextWrapping="Wrap"
                                              Grid.Row="1"
                                              Text="{Binding Description}"/>
                                    </Grid>
                                  </telerik:RadMenuItem.Header>
                                </telerik:RadMenuItem>
                              </DataTemplate>
                            </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                          </spreadsheetUtilities:SingleTemplateSelector>
                        </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                      </telerik:RadMenuGroupItem>
                      <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_CustomScalingOptions" Command="{Binding ShowPageSetupDialogPageTabCommand}"/>
                    </telerik:RadContextMenu>
                  </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <Button
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_PageSetup"
                        Command="{Binding ShowPageSetupDialogPageTabCommand}"
                        HorizontalAlignment="Right"
                        Style="{StaticResource LinkButtonStyle}"
                        Margin="0 5 0 0"
                        AutomationProperties.AutomationId="btnPrintingPageSetup"/>
              </StackPanel>
              <Border HorizontalAlignment="Right" Width="1" Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            </Grid>
            <Grid Grid.Row="1" Grid.Column="1" Opacity="{Binding HasAnyPages, Converter={StaticResource BooleanToOpacityConverter}}" Margin="45 0 0 0">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <worksheet:WorksheetPrintPresenter x:Name="PART_PrintPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
              <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8" Height="40">
                <telerik:RadButton
                        Command="{Binding MoveToPreviousPageCommand}"
                        IsEnabled="{Binding CanMoveToPreviousPage}"
                        IsBackgroundVisible="False"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToPreviousPage"
                        Margin="0 0 8 0"
                        Width="24">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Left}"/>
                </telerik:RadButton>
                <TextBox x:Name="PART_CurrentPageTextBox"
                        Text="{Binding CurrentPageNumberTextValue, Mode=TwoWay}"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        MinWidth="24"
                        MaxWidth="60"/>
                <TextBlock
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PrintPreview_Of"
                        Margin="4 0"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                <TextBlock
                        Text="{Binding PagesCount, Mode=OneWay}"
                        VerticalAlignment="Center"
                        FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"
                        AutomationProperties.AutomationId="tbPagesCount"/>
                <telerik:RadButton
                        Command="{Binding MoveToNextPageCommand}"
                        IsEnabled="{Binding CanMoveToNextPage}"
                        IsBackgroundVisible="False"
                        Width="24"
                        Padding="0"
                        AutomationProperties.AutomationId="btnMoveToNextPageCommand"
                        Margin="8 0 0 0">
                  <telerik:RadGlyph HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphArrow60Right}"/>
                </telerik:RadButton>
              </StackPanel>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
    <Setter Property="helpers:ThemeHelper.PressedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SubtleSecondaryBrush}"/>
    <Setter Property="helpers:ThemeHelper.CheckedBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
    <Setter Property="CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="MinHeight" Value="22"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Pressed"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed"/>
                <VisualState x:Name="Opened"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="BorderVisual"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{TemplateBinding Background}"
                      CornerRadius="{TemplateBinding CornerRadius}"/>
              <Grid x:Name="DropDownIndicator" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Canvas.ZIndex="2">
                <telerik:RadGlyph x:Name="Glyph" Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}" FontSize="12" Glyph="{StaticResource GlyphArrowChevronDown}"/>
              </Grid>
              <Popup x:Name="DropDownPopup"
                      AllowsTransparency="True"
                      StaysOpen="False"
                      Focusable="False"
                      Placement="Bottom"
                      VerticalOffset="{telerik:Windows11Resource ResourceKey=PopupOffset}">
                <Border x:Name="DropDownPopupBorder"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"
                        BorderThickness="1"
                        CornerRadius="{telerik:Windows11Resource ResourceKey=OverlayCornerRadius}"
                        MinWidth="3"
                        MinHeight="12"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentControl x:Name="DropDownPopupContent"
                          Content="{TemplateBinding DropDownContent}"
                          ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Stretch"
                          DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
              </Popup>
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="True"/>
                <Condition Property="IsOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsOpen" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CheckedBackgroundBrush)}"/>
              <Setter TargetName="Glyph" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameBoxStyle" TargetType="spreadsheetControls:NameBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Width" Value="150"/>
    <Setter Property="FontStyle" Value="Normal"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NameBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="NameBoxInputBox"
                    Text="{Binding Path=TextBoxText, Mode=TwoWay}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    helpers:ThemeHelper.MouseOverBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBackgroundBrush="Transparent"
                    helpers:ThemeHelper.FocusBrush="Transparent"
                    helpers:ThemeHelper.DisabledBackgroundBrush="Transparent"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Background="Transparent"/>
            <telerik:RadDropDownButton x:Name="DropDownButton"
                    Grid.Column="1"
                    Padding="0"
                    DropDownWidth="{TemplateBinding Width}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    IsOpen="{Binding IsOpen,Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=NameBoxInputBox}"
                    Margin="0 0 4 0"
                    Style="{StaticResource NameBoxButtonStyle}">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadMenuGroupItem ItemsSource="{Binding NameBoxNames}" DataContext="{Binding}" BorderThickness="0" MaxHeight="250" MinHeight="20" ScrollViewer.VerticalScrollBarVisibility="Auto">
                  <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                    <spreadsheetUtilities:SingleTemplateSelector>
                      <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                        <DataTemplate>
                          <telerik:RadMenuItem Header="{Binding Name}" CommandParameter="{Binding Name}" Command="{Binding DataContext.SelectName,RelativeSource={RelativeSource FindAncestor,AncestorType=spreadsheetControls:NameBox}}">
                            <telerik:EventToCommandBehavior.EventBindings>
                              <telerik:EventBinding EventName="MouseLeftButtonUp" RaiseOnHandledEvents="True" Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                            </telerik:EventToCommandBehavior.EventBindings>
                          </telerik:RadMenuItem>
                        </DataTemplate>
                      </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    </spreadsheetUtilities:SingleTemplateSelector>
                  </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                </telerik:RadMenuGroupItem>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBackgroundBrush)}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledBrush)}"/>
              <Setter TargetName="DropDownButton" Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.DisabledForegroundBrush)}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxTextBoxStyle" TargetType="RichTextBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="CaretBrush" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="11 0"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RichTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" VerticalAlignment="Center" BorderThickness="0" IsTabStop="False"/>
            <Border x:Name="FocusVisual" Style="{StaticResource InputFocusVisualBorderStyle}" CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBackgroundBrush)}"/>
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBackgroundBrush), Mode=OneWay}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBoxStyle" TargetType="spreadsheetControls:FormulaBarFunctionEditor">
    <Setter Property="spreadsheetControls:FormulaBarFunctionEditor.MinHeight" Value="40"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FormulaBarFunctionEditor">
          <Grid>
            <RichTextBox x:Name="PART_TextBox"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontStyle="{TemplateBinding FontStyle}"
                    VerticalScrollBarVisibility="Hidden"
                    Style="{StaticResource ResourceKey=FormulaBoxTextBoxStyle}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormulaBarButtonStyle" BasedOn="{StaticResource RadButtonStyle}" TargetType="{x:Type telerik:RadButton}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="MinWidth" Value="32"/>
  </Style>
  <Style x:Key="RadSpreadsheetFormulaBarStyle" TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="10 0"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetFormulaBar">
          <Border
                  Padding="{TemplateBinding Padding}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center">
              <Grid.RowDefinitions>
                <RowDefinition MinHeight="32"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <spreadsheetControls:NameBox SheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor}" FontSize="{TemplateBinding FontSize}" Width="150"/>
              <spreadsheetControls:FormulaBarFunctionEditor x:Name="FormulaBarFunctionEditor"
                      Grid.Column="2"
                      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarEnabled}"
                      Style="{StaticResource FormulaBoxStyle}"/>
              <Border Grid.Column="1" BorderThickness="0" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="10 0" MinWidth="66">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <telerik:RadButton x:Name="CancelChangesButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=ValidationBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphClose}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="EnterFormulaButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplyChangesCommand}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFormulaBarButtonEnabled}"
                          Foreground="#FF3A801A">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphCheck}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="InsertFunctionButton"
                          Style="{StaticResource FormulaBarButtonStyle}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.Command}"
                          IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ShowInsertFunctionDialog.IsEnabled}"
                          Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}">
                    <telerik:RadGlyph Glyph="{StaticResource GlyphFormulaFx}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  </telerik:RadButton>
                </StackPanel>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger SourceName="InsertFunctionButton" Property="IsPressed" Value="True">
              <Setter TargetName="InsertFunctionButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorSliderButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="4 0"/>
    <Setter Property="IsBackgroundVisible" Value="False"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
    <Setter Property="MinWidth" Value="32"/>
    <Setter Property="MinHeight" Value="32"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="ScaleFactorSliderStyle" TargetType="spreadsheetControls:ScaleFactorSlider">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ScaleFactorSlider">
          <Grid HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition Width="120"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto" MinWidth="40"/>
            </Grid.ColumnDefinitions>
            <telerik:RadButton x:Name="PART_ShowCustomScaleDialogButton"
                    Grid.Column="3"
                    ContentStringFormat="{}{0}%"
                    Margin="0"
                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScaleFactor.Width, Converter={StaticResource doubleToPercentConverter}}"
                    Foreground="{TemplateBinding Foreground}"
                    Style="{StaticResource ScaleFactorSliderButtonStyle}"/>
            <telerik:RadButton x:Name="ScaleOutButton" Grid.Column="0" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphMinus}"/>
            </telerik:RadButton>
            <telerik:RadSlider x:Name="PART_ScaleSlider"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="1"
                    Margin="0 1"
                    VerticalAlignment="Center"
                    AutoToolTipPlacement="None"
                    Background="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
            <telerik:RadButton x:Name="ScaleInButton" Grid.Column="2" Padding="0" Style="{StaticResource ScaleFactorSliderButtonStyle}">
              <telerik:RadGlyph SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
            </telerik:RadButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PART_ShowCustomScaleDialogButton" Property="IsPressed" Value="True">
              <Setter TargetName="PART_ShowCustomScaleDialogButton" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSpreadsheetStatusBarStyle" TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="46"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:RadSpreadsheetStatusBar">
          <Border
                  BorderThickness="{TemplateBinding BorderThickness}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Padding="12 0" VerticalAlignment="Center">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StatusBar_ReadyCapital"/>
              </Border>
              <Border Grid.Column="2" Padding="9 0">
                <spreadsheetControls:ScaleFactorSlider IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.CommandDescriptors.ScaleFactor.IsEnabled}" ScaleFactor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor.ScaleFactor, Mode=TwoWay}" ActiveSheetEditor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RadSpreadsheet.ActiveSheetEditor, Mode=OneWay}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryContentItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="2"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid Background="{TemplateBinding Background}">
            <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu x:Name="PART_ContextMenu">
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Apply" Command="{Binding Path=ApplyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Modify" Command="{Binding Path=ModifyStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Duplicate" Command="{Binding Path=DuplicateStyleCommand, Mode=OneTime}" CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_Delete"
                        Command="{Binding Path=DeleteStyleCommand, Mode=OneTime}"
                        CommandParameter="{Binding Path=ContentItem, Mode=OneTime}"
                        IsEnabled="{Binding Path=ContentItem.CellStyle.IsRemoveable, Mode=OneTime}"/>
              </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <ToolTipService.ToolTip>
              <ToolTip Content="{Binding Path=ContentItem.CellStyle.Name, Mode=OneTime}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="{telerik:Windows11Resource ResourceKey=DisabledOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected"/>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedRectangle"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Margin="{TemplateBinding Padding}">
              <Rectangle Fill="#FFFFFFFF" IsHitTestVisible="False"/>
              <Image x:Name="contentPresenter" Source="{Binding Path=ContentItem.ImageSource}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
              <Rectangle x:Name="SelectedRectangle" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" IsHitTestVisible="False" Opacity="0"/>
              <Rectangle x:Name="FocusVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}" StrokeThickness="2" Visibility="Collapsed"/>
              <Rectangle x:Name="MouseOverVisualElement" Stroke="{telerik:Windows11Resource ResourceKey=AccentBrush}" StrokeThickness="1" IsHitTestVisible="False" Opacity="0"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleGalleryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusVisualMargin" Value="0"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{x:Null}"/>
    <Setter Property="HorizontalAlignment" Value="Right"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=SecondaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="22"/>
    <Setter Property="IsTabStop" Value="False"/>
  </Style>
  <Style x:Key="StyleGalleryStyle" TargetType="spreadsheetControls:StyleGallery">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="PopupContentWidth" Value="636"/>
    <Setter Property="QuickStylesWidth" Value="332"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource StyleGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource StyleGalleryContentItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:StyleGallery">
          <Grid Width="{TemplateBinding QuickStylesWidth}">
            <Border
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <spreadsheetControls:AutomatedListBox x:Name="QuickStyles" IsTabStop="False" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden">
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding QuickStylesWidth}"/>
                    </ItemsPanelTemplate>
                  </ListBox.ItemsPanel>
                </spreadsheetControls:AutomatedListBox>
                <Grid Grid.Column="1">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <telerik:RadButton x:Name="PageUpButton"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTop}"
                          BorderThickness="1 0 0 1"
                          Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageUp"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PageDownButton" Margin="0 -1" Grid.Row="1" CornerRadius="0" BorderThickness="1 1 0 1" Style="{StaticResource StyleGalleryButtonStyle}">
                    <telerik:RadGlyph x:Name="GlyphPageDown"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"
                            FontSize="12"/>
                  </telerik:RadButton>
                  <telerik:RadButton x:Name="PopupLaunchButton"
                          Grid.Row="2"
                          CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightBottom}"
                          Style="{StaticResource StyleGalleryButtonStyle}"
                          BorderThickness="1 1 0 0">
                    <ToolTipService.ToolTip>
                      <ToolTip
                              Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                              BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                              Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                              BorderThickness="1"
                              Padding="8"
                              MinHeight="50">
                        <StackPanel>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_More" FontWeight="SemiBold" FontSize="11"/>
                          <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleGallery_ToolTipInfo" Margin="4" TextWrapping="Wrap" MaxWidth="200" FontSize="11"/>
                        </StackPanel>
                      </ToolTip>
                    </ToolTipService.ToolTip>
                    <telerik:RadGlyph x:Name="GlyphPopupLaunch"
                            Foreground="{telerik:Windows11Resource ResourceKey=IconSecondaryBrush}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Glyph="{StaticResource GlyphArrowOverflowDown}"/>
                  </telerik:RadButton>
                </Grid>
              </Grid>
            </Border>
            <telerik:RadDropDownButton x:Name="PopupContainer" Width="{Binding PopupContentWidth}" Height="0" MaxHeight="0" MinHeight="0" IsTabStop="False" Margin="0 -100 0 0">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ListBox x:Name="PopupListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" mat:MaterialAssist.ShadowDepth="Depth0" IsTabStop="False">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel Orientation="Horizontal" MaxWidth="{Binding PopupContentWidth}"/>
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </ListBox>
                  <telerik:RadContextMenu
                          Grid.Row="1"
                          BorderThickness="0"
                          Padding="0"
                          BorderBrush="{Binding ElementName=PopupListBox, Path=BorderBrush}"
                          mat:MaterialAssist.ShadowDepth="Depth0"
                          IsTabStop="False">
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_NewCellStyle" x:Name="NewCellStyleMenuItem" IsTabStop="False">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/newCellStyle.png" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                  </telerik:RadContextMenu>
                </Grid>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <telerikControls:RadSpreadsheet x:Name="SnapshotRadSpreadsheet" Width="500" Height="500" Canvas.ZIndex="3000" Margin="500 500 0 0"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PageUpButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsPressed" Value="True">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
            <Trigger SourceName="PageUpButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageUp" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageUp" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PageDownButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPageDown" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPageDown" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger SourceName="PopupLaunchButton" Property="IsEnabled" Value="False">
              <Setter TargetName="GlyphPopupLaunch" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
              <Setter TargetName="GlyphPopupLaunch" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LargeThemePreviewControlStyle" TargetType="spreadsheetControls:LargeThemePreviewControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:LargeThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="39"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="10"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="39"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 1 0 0" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="12"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="29 -3 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 4 0 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLightBrush}"
                      Width="41"
                      Height="2"
                      BorderThickness="1"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"
                      HorizontalAlignment="Left"
                      Margin="0 13 0 0"/>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="4 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="11 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="25 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="32 0 0 5"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="6"
                      Height="5"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="39 0 0 5"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DocumentThemeListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="Padding" Value="8 5 8 1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Container"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{telerik1:Windows11Resource ResourceKey=FocusThickness}"
                        BorderBrush="{telerik1:Windows11Resource ResourceKey=AccentBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.RowSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <spreadsheetControls:LargeThemePreviewControl
                        Margin="{TemplateBinding Padding}"
                        Accent1="{Binding ElementName=Container, Path=DataContext.Accent1}"
                        Accent2="{Binding ElementName=Container, Path=DataContext.Accent2}"
                        Accent3="{Binding ElementName=Container, Path=DataContext.Accent3}"
                        Accent4="{Binding ElementName=Container, Path=DataContext.Accent4}"
                        Accent5="{Binding ElementName=Container, Path=DataContext.Accent5}"
                        Accent6="{Binding ElementName=Container, Path=DataContext.Accent6}"
                        Text2="{Binding ElementName=Container, Path=DataContext.Text2}"
                        Major="{Binding ElementName=Container, Path=DataContext.Major}"
                        Minor="{Binding ElementName=Container, Path=DataContext.Minor}"/>
                <TextBlock Text="{Binding Path=Name}" Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 0 2"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeGalleryHeaderItemStyle" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource GalleryHeaderItemBaseStyle}">
    <Setter Property="Width" Value="{Binding PopupContentWidth}"/>
  </Style>
  <Style x:Key="ThemeGalleryStyle" TargetType="spreadsheetControls:ThemeGallery">
    <Setter Property="PopupContentWidth" Value="240"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="385"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource ThemeGalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource DocumentThemeListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ThemeGallery">
          <Grid>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Padding="0"
                    BorderThickness="0"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}">
              <telerik:RadListBox.ItemsPanel>
                <ItemsPanelTemplate>
                  <telerik:RadWrapPanel Orientation="Horizontal" Width="{Binding PopupContentWidth}"/>
                </ItemsPanelTemplate>
              </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemePreviewControlStyle" TargetType="spreadsheetControls:SmallThemePreviewControl">
    <Setter Property="Width" Value="32"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemePreviewControl">
          <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="7"/>
                <ColumnDefinition Width="3"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="7"/>
                <RowDefinition Height="21"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{Binding Path=Text2}" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.ColumnSpan="2"
                      BorderThickness="1 1 1 0"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlLowBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.RowSpan="2"
                      BorderThickness="1 1 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="1"
                      Grid.Row="1"
                      BorderThickness="0 0 0 1"/>
              <Border
                      BorderBrush="{StaticResource ThemeControlHighBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"
                      Grid.Column="2"
                      Grid.Row="1"
                      BorderThickness="0 1 1 1"/>
              <TextBlock Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2 1 0 4" TextAlignment="Left">
                <TextBlock.Inlines>
                  <Run FontSize="{Binding Path=MajorFontSize}" FontFamily="{Binding Path=Major}" Foreground="{Binding Path=Text2}" Text="A"/>
                  <Run FontSize="{Binding Path=MinorFontSize}" FontFamily="{Binding Path=Minor}" Foreground="{Binding Path=Text2}" Text="a"/>
                </TextBlock.Inlines>
              </TextBlock>
              <Rectangle
                      Fill="{Binding Path=Accent1}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="2 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent2}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="6 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent3}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="10 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent4}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="14 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent5}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="18 0 0 3"/>
              <Rectangle
                      Fill="{Binding Path=Accent6}"
                      Width="3"
                      Height="3"
                      Grid.Row="1"
                      Grid.Column="0"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Bottom"
                      Margin="22 0 0 3"/>
              <Canvas Grid.Column="2">
                <Path Fill="{StaticResource ThemeControlPathFillBrush}" Data="{StaticResource ArrowBottomLeft7x7}"/>
              </Canvas>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeColorsListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8 0"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="0 1 1 0"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        BorderThickness="0 1 1 0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"
                        Grid.ColumnSpan="2"/>
                <Rectangle x:Name="Pill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}" Style="{StaticResource DefaultItemPillStyle}"/>
                <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="Center">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Text2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Background2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="1" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent1}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="2" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent2}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="3" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent3}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="4" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent4}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="5" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent5}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="6" Width="11" Height="11"/>
                  <Rectangle Margin="1 0" Fill="{Binding Path=Accent6}" StrokeThickness="1" Stroke="{StaticResource ThemeControlRectangleStrokeBrush}" Grid.Column="7" Width="11" Height="11"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorGalleryStyle" TargetType="spreadsheetControls:ColorGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="608"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="210"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeColorsListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:ColorGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0 1 0 0" mat:MaterialAssist.ShadowDepth="Depth0" Padding="0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeColors" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeColorsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeColorPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeColorPreviewControl">
          <Border BorderBrush="{StaticResource ThemeControlMediumBrush}" BorderThickness="1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Rectangle Fill="{Binding Path=Text2}"/>
              <Rectangle Grid.Column="1" Fill="{Binding Path=Background2}"/>
              <Rectangle Grid.Row="1" Fill="{Binding Path=Accent1}"/>
              <Rectangle Grid.Row="1" Grid.Column="1" Fill="{Binding Path=Accent2}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ThemeFontListBoxItemStyle" TargetType="telerik:RadListBoxItem">
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 2 0 2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LayoutStates"/>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Wrapper">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates"/>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Container"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedVisual"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        Margin="0"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource TransparentBrush}"
                        Background="{telerik:Windows11Resource ResourceKey=SelectedBrush}"/>
                <Border x:Name="Wrapper"
                        Visibility="Collapsed"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource TransparentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"
                        Background="{telerik:Windows11Resource ResourceKey=SubtleBrush}"/>
                <Rectangle x:Name="Pill"
                        Height="Auto"
                        Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                        Style="{StaticResource DefaultItemPillStyle}"/>
                <Border Background="{StaticResource ThemeControlMediumBrush}" Padding="1" Width="43" Height="43" Margin="10 0 0 0">
                  <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                    <Border Background="{StaticResource ThemeControlFontPreviewDarkBrush}" Padding="1">
                      <Border Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}" Padding="1">
                        <TextBlock Margin="2 0 0 0" VerticalAlignment="Bottom" Foreground="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}">
                          <TextBlock.Inlines>
                            <Run FontSize="21" FontFamily="{Binding Path=Major}" Text="A"/>
                            <Run FontSize="16" FontFamily="{Binding Path=Minor}" Text="a"/>
                          </TextBlock.Inlines>
                        </TextBlock>
                      </Border>
                    </Border>
                  </Border>
                </Border>
                <Grid Margin="{TemplateBinding Padding}" Grid.Column="1" Height="50">
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <TextBlock Text="{Binding Path=Name}" FontWeight="SemiBold" FontSize="{telerik:Windows11Resource ResourceKey=FontSize}"/>
                  <TextBlock Text="{Binding Path=Major}" FontFamily="{Binding Path=Major}" Grid.Row="1"/>
                  <TextBlock Text="{Binding Path=Minor}" FontFamily="{Binding Path=Minor}" Grid.Row="2"/>
                </Grid>
                <ContentPresenter x:Name="contentPresenter"
                        Grid.Column="1"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter TargetName="Pill" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik:Windows11Resource ResourceKey=DisabledOpacity}"/>
              <Setter TargetName="contentPresenter" Property="TextBlock.Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontGalleryStyle" TargetType="spreadsheetControls:FontGallery">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=TertiaryBackgroundBrush}"/>
    <Setter Property="Height" Value="593"/>
    <Setter Property="MaxWidth" Value="300"/>
    <Setter Property="PopupContentWidth" Value="205"/>
    <Setter Property="GalleryHeaderItemStyle" Value="{StaticResource GalleryHeaderItemStyle}"/>
    <Setter Property="GalleryContentItemStyle" Value="{StaticResource ThemeFontListBoxItemStyle}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FontGallery">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <telerik:RadListBox x:Name="PopupListBox"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    BorderThickness="0"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    telerik:CornerRadiusHelper.ClipRadius="{telerik1:Windows11Resource ResourceKey=OverlayCornerRadius}"/>
            <telerik:RadContextMenu Grid.Row="1" BorderThickness="0" Padding="0" mat:MaterialAssist.ShadowDepth="Depth0">
              <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_Themes_CreateNewThemeFonts" Command="{Binding Path=RadSpreadsheet.CommandDescriptors.ShowCreateNewThemeFontsDialog.Command}"/>
            </telerik:RadContextMenu>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SmallThemeFontPreviewControlStyle" TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=AlternativeBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:SmallThemeFontPreviewControl">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
            <TextBlock Text="A" FontFamily="{Binding Path=Major}" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberFormatAutoCompleteComboBoxControlStyle" TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
    <Setter Property="helpers:ThemeHelper.MouseOverBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik:Windows11Resource ResourceKey=AccentBrush}"/>
    <Setter Property="helpers:ThemeHelper.FocusBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBorderBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledBackgroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledBackgroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.DisabledForegroundBrush" Value="{telerik:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
    <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik:Windows11Resource ResourceKey=CornerRadius}"/>
    <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=SecondaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=InputBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="160"/>
    <Setter Property="ItemsPanelHeight" Value="476"/>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox">
          <Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
            <telerik:RadAutoCompleteBox x:Name="autoCompleteBox"
                    Background="Transparent"
                    BorderBrush="{x:Null}"
                    BorderThickness="0"
                    SelectionMode="Single"
                    HorizontalAlignment="Stretch"
                    Padding="0"
                    Margin="{TemplateBinding BorderThickness}"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    TextSearchMode="StartsWith"
                    AutoCompleteMode="Append"
                    TextSearchPath="FormatTypeAsString"
                    Focusable="False"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    SelectedItem="{Binding Path=CellValueFormat, Mode=TwoWay, Converter={StaticResource cellValueFormatToNumberFormatInfoConverter}}"
                    ItemsSource="{Binding NumberFormatSource}"/>
            <telerik:RadDropDownButton x:Name="radDropDown"
                    Grid.Column="1"
                    Padding="0"
                    Width="32"
                    Height="32"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsBackgroundVisible="False"
                    helpers:ThemeHelper.FocusVisualMargin="0"
                    BorderThickness="0"
                    helpers:ThemeHelper.FocusBrush="{x:Null}"
                    helpers:ThemeHelper.MouseOverBrush="{x:Null}"
                    helpers:ThemeHelper.PressedBrush="{x:Null}"
                    Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomTop}"
                    CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    IsOpen="{Binding Path=IsOpen, Mode=TwoWay}"
                    PopupPlacementTarget="{Binding ElementName=autoCompleteBox}"
                    MaxHeight="600"
                    DropDownMaxWidth="270">
              <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu BorderThickness="0">
                  <telerik:RadMenuGroupItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[0].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/general.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[0].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[0].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[1].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/number.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[1].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[1].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[2].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/currency.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[2].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[2].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[3].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/accounting.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[3].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[3].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[4].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/shortDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[4].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[4].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[5].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/longDate.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[5].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[5].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[6].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/time.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[6].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[6].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[7].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/percentage.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[7].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[7].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[8].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/fraction.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[8].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[8].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[9].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/scientific.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[9].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[9].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IconColumnWidth="44" Command="{Binding RadSpreadsheet.CommandDescriptors.SetFormat.Command}" CommandParameter="{Binding NumberFormatSource[10].Format.FormatString}">
                      <telerik:RadMenuItem.Icon>
                        <Image Source="{telerik:IconResource IconRelativePath=32/textFormat.png, IconSources={StaticResource IconPaths}}" Stretch="None"/>
                      </telerik:RadMenuItem.Icon>
                      <telerik:RadMenuItem.Header>
                        <Grid>
                          <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <TextBlock Text="{Binding Path=NumberFormatSource[10].FormatTypeAsString}" FontWeight="SemiBold"/>
                          <TextBlock Grid.Row="1" Text="{Binding Path=NumberFormatSource[10].FormatResult}" VerticalAlignment="Top" Margin="0 0 2 5"/>
                        </Grid>
                      </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_NumberFormatComboBox_MoreFormats"
                          CommandParameter="Number"
                          spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                          Command="{Binding RadSpreadsheet.CommandDescriptors.ShowFormatCellsDialog.Command}"/>
                </telerik:RadContextMenu>
              </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger SourceName="radDropDown" Property="IsOpen" Value="True">
              <Setter TargetName="autoCompleteBox" Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="LineStyle" TargetType="Line">
    <Setter Property="Margin" Value="10"/>
    <Setter Property="Stretch" Value="None"/>
    <Setter Property="X1" Value="0"/>
    <Setter Property="X2" Value="200"/>
    <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
  </Style>
  <Style x:Key="BordersMenuStyle" TargetType="spreadsheetControls:BordersMenu">
    <Setter Property="IsEnabled" Value="{Binding Path=SetBorders.IsEnabled}"/>
    <Setter Property="SelectedItemCommand" Value="{Binding Path=SetBorders.Command}"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="SelectedItemCommandParameter">
      <Setter.Value>
        <worksheetCommands:SetBordersCommandParameter BottomBorderStyle="Thin" BorderColor="Black"/>
      </Setter.Value>
    </Setter>
    <Setter Property="Height" Value="32"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:BordersMenu">
          <telerik:RadSplitButton x:Name="BordersSplitButton"
                  IsToggle="False"
                  Padding="4"
                  Command="{Binding Path=SelectedItemCommand, RelativeSource={RelativeSource TemplatedParent}}"
                  CommandParameter="{Binding Path=SelectedItemCommandParameter, RelativeSource={RelativeSource TemplatedParent}}"
                  BorderThickness="0"
                  helpers:ThemeHelper.FocusBrush="{x:Null}">
            <telerik:RadSplitButton.Content>
              <Image Source="{Binding Path=SelectedItemImage, RelativeSource={RelativeSource TemplatedParent}}" Stretch="None" UseLayoutRounding="True"/>
            </telerik:RadSplitButton.Content>
            <telerik:RadSplitButton.DropDownContent>
              <telerik:RadContextMenu BorderThickness="0" Margin="0" StaysOpen="False">
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_Borders" Background="Transparent" Padding="0" BorderThickness="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_BottomBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="BottomBorderCommandParameter" BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="TopBorderCommandParameter" TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LeftBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="LeftBorderCommandParameter" LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_RightBorder" Command="{Binding Path=SetBorders.Command}">
                    <telerik:RadMenuItem.CommandParameter>
                      <worksheetCommands:SetBordersCommandParameter x:Name="RightBorderCommandParameter" RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </telerik:RadMenuItem.CommandParameter>
                    <telerik:RadMenuItem.Icon>
                      <Grid>
                        <Image Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                      </Grid>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="NoBorderCommandParameter" AllBordersStyle="None"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/noBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_AllBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="AllBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideHorizontalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            InsideVerticalBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/allBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_OutsideBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="OutsideBorderCommandParameter"
                            LeftBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            TopBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            RightBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BottomBorderStyle="{Binding Path=SelectedBorderStyle, RelativeSource={RelativeSource TemplatedParent}}"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/outsideBorders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBoxBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBoxBorderCommandParameter" OutsideBordersStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBorderBox.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_ThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="ThickBottomBorderCommandParameter" BottomBorderStyle="Thick" BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/thickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thin"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_TopAndThickBottomBorder" Command="{Binding Path=SetBorders.Command}">
                  <telerik:RadMenuItem.CommandParameter>
                    <worksheetCommands:SetBordersCommandParameter x:Name="TopThickBottomBorderCommandParameter"
                            TopBorderStyle="Thin"
                            BottomBorderStyle="Thick"
                            BorderColor="{Binding Path=SelectedBorderColor, RelativeSource={RelativeSource TemplatedParent}}"/>
                  </telerik:RadMenuItem.CommandParameter>
                  <telerik:RadMenuItem.Icon>
                    <Grid>
                      <Image Source="{telerik:IconResource IconRelativePath=16/topAndThickBottomBorder.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </Grid>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_DrawBorders" BorderThickness="0" Background="Transparent" Padding="0">
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineColor">
                    <telerik:RadMenuItem.Icon>
                      <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                        <Image Source="{telerik:IconResource IconRelativePath=16/pen.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                        <Rectangle x:Name="PenIconColorRectangle" Width="16" Height="3" Margin="0 -3 0 0"/>
                      </StackPanel>
                    </telerik:RadMenuItem.Icon>
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0">
                      <telerik:RadColorSelector x:Name="BorderColorSelector"
                              MainPaletteHeaderText="{Binding Path=ColorSelectorMainPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              StandardPaletteHeaderText="{Binding Path=ColorSelectorStandardPaletteHeaderText, RelativeSource={RelativeSource TemplatedParent}}"
                              Margin="-1"
                              BorderThickness="0"
                              AutomaticColor="Black"
                              HeaderPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.HeaderPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteItemsSource="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteItemsSource, RelativeSource={RelativeSource TemplatedParent}}"
                              MainPaletteOrientation="{Binding Path=RadSpreadsheet.ColorPalette.MainPaletteOrientation, RelativeSource={RelativeSource TemplatedParent}}"
                              RecentColorsVisibility="Visible"
                              IsRecentColorsActive="True">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedColor,ElementName=BorderColorSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadColorSelector.AdditionalContent>
                          <telerik:RadButton x:Name="MoreColorsButton"
                                  BorderThickness="0"
                                  Background="Transparent"
                                  HorizontalContentAlignment="Left"
                                  IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}"
                                  Command="{Binding Path=ShowMoreColorsDialog.Command}"
                                  CommandParameter="{Binding Path=UpdateSelectedBorderColorCommand, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                              <Image Source="{telerik:IconResource IconRelativePath=16/color.png, IconSources={StaticResource IconPaths}}" Width="16" Height="16"/>
                              <TextBlock
                                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ColorSelector_MoreColors"
                                      Margin="10 0 0 0"
                                      FontWeight="Normal"
                                      Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"/>
                            </StackPanel>
                            <telerik:RadButton.Resources>
                              <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}">
                                <Style.Triggers>
                                  <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
                                  </Trigger>
                                </Style.Triggers>
                              </Style>
                            </telerik:RadButton.Resources>
                          </telerik:RadButton>
                        </telerik:RadColorSelector.AdditionalContent>
                      </telerik:RadColorSelector>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_LineStyle">
                    <telerik:RadMenuGroupItem BorderThickness="0" Padding="0" Margin="0 0 0 1" Width="130">
                      <telerik:RadListBox x:Name="BorderStyleSelector" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Height="329">
                        <telerik:EventToCommandBehavior.EventBindings>
                          <telerik:EventBinding
                                  EventName="MouseLeftButtonUp"
                                  CommandParameter="{Binding Path=SelectedItem,ElementName=BorderStyleSelector}"
                                  RaiseOnHandledEvents="True"
                                  Command="{x:Static telerik:PopupCommands.CloseAll}"/>
                        </telerik:EventToCommandBehavior.EventBindings>
                        <telerik:RadListBox.ItemsPanel>
                          <ItemsPanelTemplate>
                            <VirtualizingStackPanel/>
                          </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBoxItem HorizontalContentAlignment="Left" Tag="None" Padding="0">
                          <TextBlock Margin="10 5" telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_NoBorder" Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thin" IsSelected="True">
                          <Line Style="{StaticResource LineStyle}" Height="1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Hair">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="1.5 1.5"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dotted">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Dashed">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="3 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="DashDotDot">
                          <Line Style="{StaticResource LineStyle}" Height="1" StrokeDashArray="8 2 2 2 2 2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Medium">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="2 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashed">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="MediumDashDotDot">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="2" StrokeDashArray="4 1 1 1 1 1"/>
                        </telerik:RadListBoxItem>
                        <telerik:RadListBoxItem Tag="Thick">
                          <Line Style="{StaticResource LineStyle}" StrokeThickness="3"/>
                        </telerik:RadListBoxItem>
                      </telerik:RadListBox>
                    </telerik:RadMenuGroupItem>
                  </telerik:RadMenuItem>
                </telerik:RadMenuGroupItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_BorderMenu_MoreBorders"
                        Command="{Binding Path=ShowFormatCellsDialog.Command}"
                        IsEnabled="{Binding Path=ShowFormatCellsDialog.IsEnabled}"
                        CommandParameter="Border">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/borders.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
              </telerik:RadContextMenu>
            </telerik:RadSplitButton.DropDownContent>
          </telerik:RadSplitButton>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AdornerControlStyle" TargetType="spreadsheetControls:AdornerControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid x:Name="AdornerRoot">
            <Grid x:Name="gridControl" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" Background="Transparent">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHorizontallyFlipped, Converter={StaticResource BoolToIntegerConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsVerticallyFlipped, Converter={StaticResource BoolToIntegerConverter}}"/>
                  <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle}"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Grid.Resources>
                <Style TargetType="Ellipse" x:Key="ResizeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Rectangle" x:Key="ResizeNoEdgeStyle">
                  <Setter Property="Margin" Value="-7"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
                <Style TargetType="Ellipse" x:Key="RotateStyle">
                  <Setter Property="Margin" Value="-30"/>
                  <Setter Property="Width" Value="14"/>
                  <Setter Property="Height" Value="14"/>
                  <Setter Property="StrokeThickness" Value="1"/>
                  <Setter Property="Stroke" Value="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"/>
                  <Setter Property="Fill" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
                </Style>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
              </Grid.ColumnDefinitions>
              <Image x:Name="ImagePreview" Stretch="Fill" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" Opacity="1"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Left"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.RowSpan="3"
                      HorizontalAlignment="Right"
                      Grid.Column="1"
                      VerticalAlignment="Stretch"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Top"/>
              <Rectangle
                      StrokeThickness="0"
                      Height="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Stroke="Black"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Stretch"
                      Grid.Row="1"
                      VerticalAlignment="Bottom"/>
              <Rectangle x:Name="rotateLine"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      StrokeThickness="0"
                      Height="24"
                      Width="1"
                      Fill="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      Grid.ColumnSpan="3"
                      HorizontalAlignment="Center"
                      Grid.Row="1"
                      VerticalAlignment="Top"
                      Margin="0 -20 0 0"/>
              <Ellipse x:Name="Rotate"
                      Visibility="{Binding Path=IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      Style="{StaticResource RotateStyle}"
                      Stroke="{telerik:Windows11Resource ResourceKey=AccentSelectedBrush}"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Top"
                      Grid.ColumnSpan="3"
                      Grid.RowSpan="3"/>
              <Ellipse x:Name="Resize00" Style="{StaticResource ResizeStyle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize10" Style="{StaticResource ResizeStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"/>
              <Ellipse x:Name="Resize01" Style="{StaticResource ResizeStyle}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
              <Ellipse x:Name="Resize11" Style="{StaticResource ResizeStyle}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
              <Rectangle x:Name="ResizeTop" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeBottom" Style="{StaticResource ResizeNoEdgeStyle}" VerticalAlignment="Bottom" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeLeft" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
              <Rectangle x:Name="ResizeRight" Style="{StaticResource ResizeNoEdgeStyle}" HorizontalAlignment="Right" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionsMenuStyle" TargetType="spreadsheetControls:FunctionsMenu">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:FunctionsMenu">
          <telerik:RadContextMenu BorderThickness="0" Padding="0" mat:MaterialAssist.IsShadowDisabled="True">
            <telerik:RadMenuGroupItem
                    Background="Transparent"
                    ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                    DataContext="{Binding}"
                    IsEnabled="{Binding Path=ApplyFunction.IsEnabled}"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    MaxHeight="500"
                    MinWidth="120"
                    StaysOpenOnClick="False">
              <telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
                <spreadsheetUtilities:SingleTemplateSelector>
                  <spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                    <DataTemplate>
                      <telerik:RadMenuItem
                              Header="{Binding Name}"
                              CommandParameter="{Binding Name}"
                              Command="{Binding Path=DataContext.ApplyFunction.Command, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}"
                              IsEnabled="{Binding Path=DataContext.ApplyFunction.IsEnabled, RelativeSource={RelativeSource AncestorType=spreadsheetControls:FunctionsMenu}}">
                        <ToolTipService.ToolTip>
                          <ToolTip MinHeight="50">
                            <StackPanel>
                              <TextBlock Text="{Binding Name}" FontWeight="Medium" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                              <TextBlock Text="{Binding Path=FunctionInfo.Description}" TextWrapping="Wrap" MaxWidth="200" Margin="0 8 0 0" FontSize="{telerik:Windows11Resource ResourceKey=FontSizeS}"/>
                            </StackPanel>
                          </ToolTip>
                        </ToolTipService.ToolTip>
                      </telerik:RadMenuItem>
                    </DataTemplate>
                  </spreadsheetUtilities:SingleTemplateSelector.MenuItemTemplate>
                </spreadsheetUtilities:SingleTemplateSelector>
              </telerik:RadMenuGroupItem.ItemContainerTemplateSelector>
            </telerik:RadMenuGroupItem>
            <telerik:RadMenuSeparatorItem/>
            <telerik:RadMenuItem
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FunctionsMenu_InsertFunction"
                    IsEnabled="{Binding Path=ShowInsertFunctionDialog.IsEnabled}"
                    Command="{Binding Path=ShowInsertFunctionDialog.Command}"
                    CommandParameter="{Binding Path=Category, RelativeSource={RelativeSource TemplatedParent}}">
              <telerik:RadMenuItem.Icon>
                <Border>
                  <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphFormulaFx}" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
                </Border>
              </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
          </telerik:RadContextMenu>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FilteringPopupControlStyle" TargetType="spreadsheetControls:FilteringPopupControl">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                  Command="{Binding InitializePopupCommand}"
                  IsOpen="{Binding Path=IsPopupOpened, Mode=TwoWay}"
                  IsEnabled="{Binding Path=CanFilter}"
                  IsTabStop="False"
                  Padding="0"
                  Margin="0 -1 2 0"
                  IsBackgroundVisible="True"
                  MinHeight="0"
                  helpers:ThemeHelper.FocusVisualMargin="0"
                  VerticalAlignment="Center"
                  DropDownIndicatorVisibility="Collapsed"
                  Focusable="False">
            <telerik:RadDropDownButton.Content>
              <StackPanel>
                <telerik:RadGlyph x:Name="SortIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource InversedBoolToVisibilityValueConverter}}"/>
                <telerik:RadGlyph x:Name="FilterIcon"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="15"
                        Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                        Glyph="{StaticResource GlyphFilter}"
                        Visibility="{Binding Path=FilterIsApplied, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              </StackPanel>
            </telerik:RadDropDownButton.Content>
            <telerik:RadDropDownButton.DropDownContent>
              <telerik:RadContextMenu DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" BorderThickness="0" Margin="0">
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Ascending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortSmallestToLargest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortAscending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Command="{Binding ElementName=PART_DropDownButton, Path=DataContext.SortCommand}" CommandParameter="Descending" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortLargestToSmallest">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/sortDescending.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}">
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=FillColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortFillColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_SortByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox ItemsSource="{Binding Path=ForeColorsItemsSource}" SelectedIndex="{Binding Path=SelectedSortForeColorIndex, Mode=TwoWay}" BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuItem Command="{Binding Path=SortCommand}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomSort">
                    <telerik:RadMenuItem.Icon>
                      <Image Source="{telerik:IconResource IconRelativePath=16/customSort.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                    </telerik:RadMenuItem.Icon>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuSeparatorItem/>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ClearFilter" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Command="{Binding Path=ClearFilter}">
                  <telerik:RadMenuItem.Icon>
                    <Image Source="{telerik:IconResource IconRelativePath=16/filterClear.png, IconSources={StaticResource IconPaths}}" Width="16"/>
                  </telerik:RadMenuItem.Icon>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByColor" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" IsEnabled="{Binding Path=RangeContainsColors, Mode=TwoWay}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsColorFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByCellColor" Visibility="{Binding Path=RangeContainsFillColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=FillColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterFillColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterFillColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorNoFill" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:GradientFillControl
                                      MaxWidth="50"
                                      MaxHeight="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      GradientType="{Binding Path=GradientType}"
                                      Color1="{Binding Path=Color1}"
                                      Color2="{Binding Path=Color2}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                  <telerik:RadMenuGroupItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_FilterByFontColor" Visibility="{Binding Path=RangeContainsFontColors, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <telerik:RadListBox
                            ItemsSource="{Binding Path=ForeColorsItemsSource}"
                            SelectedIndex="{Binding Path=SelectedFilterForeColorIndex, Mode=TwoWay}"
                            SelectedItem="{Binding Path=SelectedFilterForeColor, Mode=TwoWay}"
                            BorderThickness="0">
                      <telerik:RadListBox.ItemTemplateSelector>
                        <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                            <DataTemplate>
                              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ColorSelectorAutomatic" HorizontalAlignment="Center"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                          <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                            <DataTemplate>
                              <spreadsheetControls:PatternFillControl
                                      Width="50"
                                      Height="16"
                                      ColorScheme="{Binding ElementName=PART_DropDownButton, Path=DataContext.ColorScheme}"
                                      PatternType="{Binding Path=PatternType}"
                                      PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                      BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                            </DataTemplate>
                          </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                        </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                      </telerik:RadListBox.ItemTemplateSelector>
                    </telerik:RadListBox>
                  </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NumberFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreNumberFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsNumberFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_GreaterThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThan" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThan" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LessThanOrEqualTo" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="LessThanOrEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Between" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="GreaterThanOrEqualsTo" ComparisonOperator2="LessThanOrEqualsTo"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Top10" Command="{Binding Path=ShowTopFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsTopFilter="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AboveAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="AboveAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="AboveAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_BelowAverage" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="BelowAverage">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="BelowAverage"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DateFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreDateFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsDateFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Tomorrow" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Tomorrow">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Tomorrow"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Today" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Today">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Today"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Yesterday" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Yesterday">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Yesterday"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastWeek" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastWeek">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastWeek"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastMonth" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastMonth">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastMonth"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastQuarter" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastQuarter">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastQuarter"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_NextYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="NextYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="NextYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_ThisYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="ThisYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="ThisYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_LastYear" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="LastYear">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="LastYear"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_YearToDate" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="YearToDate">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="YearToDate"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_AllDatesInThePeriod">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter IsAllDatesInThePeriod="True"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter1" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter1">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter1"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter2" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter2">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter2"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter3" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter3">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter3"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Quarter4" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="Quarter4">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="Quarter4"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuSeparatorItem/>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_January" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="January">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="January"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_February" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="February">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="February"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_March" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="March">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="March"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_April" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="April">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="April"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_May" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="May">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="May"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_June" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="June">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="June"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_July" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="July">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="July"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_August" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="August">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="August"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_September" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="September">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="September"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_October" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="October">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="October"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_November" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="November">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="November"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_December" Command="{Binding Path=ApplyDynamicFilter}" CommandParameter="December">
                      <telerik:RadMenuItem.IsChecked>
                        <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                          <Binding.ConverterParameter>
                            <spreadsheetControls:FilteringPopupConverterParameter DynamicFilterType="December"/>
                          </Binding.ConverterParameter>
                        </Binding>
                      </telerik:RadMenuItem.IsChecked>
                    </telerik:RadMenuItem>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_TextFilters" DataContext="{Binding ElementName=PART_DropDownButton, Path=DataContext}" Visibility="{Binding Path=AreTextFiltersVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityValueConverter}}">
                  <telerik:RadMenuItem.IsChecked>
                    <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                      <Binding.ConverterParameter>
                        <spreadsheetControls:FilteringPopupConverterParameter IsTextFilter="True"/>
                      </Binding.ConverterParameter>
                    </Binding>
                  </telerik:RadMenuItem.IsChecked>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Equals" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_DoesNotEqual" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.IsChecked>
                      <Binding Path="Filter" Converter="{StaticResource FilterToVisibilityConverter}">
                        <Binding.ConverterParameter>
                          <spreadsheetControls:FilteringPopupConverterParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                        </Binding.ConverterParameter>
                      </Binding>
                    </telerik:RadMenuItem.IsChecked>
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="NotEqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                  <telerik:RadMenuSeparatorItem/>
                  <telerik:RadMenuItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_CustomFilter" Command="{Binding Path=ShowCustomFilterDialog}">
                    <telerik:RadMenuItem.CommandParameter>
                      <spreadsheetControls:CustomFilterDialogCommandParameter ComparisonOperator1="EqualsTo" ComparisonOperator2="None"/>
                    </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
                </telerik:RadMenuItem>
                <telerik:RadMenuGroupItem BorderThickness="0" Focusable="False">
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="27"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0 0 1 0" Grid.RowSpan="4"/>
                    <telerik:RadTreeView
                            Grid.Row="0"
                            Grid.ColumnSpan="2"
                            IsLineEnabled="True"
                            MinWidth="230"
                            Height="250"
                            BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                            BorderThickness="0"
                            Margin="8 8 8 0"
                            DataContext="{Binding Path=FilteringPopupTreeViewViewModel}"
                            ItemsSource="{Binding Path=Items}"
                            IsVirtualizing="True">
                      <telerik:RadTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                          <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Name}"/>
                          </StackPanel>
                        </HierarchicalDataTemplate>
                      </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>
                    <StackPanel
                            Grid.Column="1"
                            Grid.Row="1"
                            Orientation="Horizontal"
                            Margin="8 8 8 0"
                            Visibility="{Binding Path=FilteringPopupTreeViewViewModel.TreeIsOversize, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <Image Width="16" Height="16" Source="{telerik:IconResource IconRelativePath=16/warning.png, IconSources={StaticResource IconPaths}}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FilteringPopup_Oversize" Margin="2 0"/>
                    </StackPanel>
                    <Grid Grid.ColumnSpan="2" Grid.Row="2">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <telerik:RadButton
                              telerik:LocalizationManager.ResourceKey="Ok"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Center"
                              Margin="21 0 2 0"
                              Command="{Binding Path=OkCommand}"
                              IsEnabled="{Binding Path=IsOkEnabled}"/>
                      <telerik:RadButton
                              Grid.Column="1"
                              telerik:LocalizationManager.ResourceKey="Cancel"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Command="{Binding Path=CloseCommand}"
                              Margin="2 0 21 0"/>
                    </Grid>
                  </Grid>
                </telerik:RadMenuGroupItem>
              </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
          </telerik:RadDropDownButton>
          <ControlTemplate.Triggers>
            <Trigger SourceName="PART_DropDownButton" Property="IsPressed" Value="True">
              <Setter TargetName="SortIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
              <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=TertiaryForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationInputMessageControlStyle" TargetType="spreadsheetControls:DataValidationInputMessageControl">
    <Setter Property="AutomationProperties.AutomationId" Value="DataValidationInputMessageControl"/>
    <Setter Property="MaxWidth" Value="260"/>
    <Setter Property="MaxHeight" Value="160"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:DataValidationInputMessageControl">
          <Grid>
            <Rectangle Fill="#FFFFFFE1" Stroke="#FF646464" StrokeThickness="1"/>
            <StackPanel Margin="6">
              <TextBlock Text="{Binding Path=InputMessageTitle}" TextWrapping="Wrap" FontWeight="SemiBold" AutomationProperties.AutomationId="inputMessageTitle"/>
              <TextBlock Margin="2 0 0 0" FontWeight="Light" Text="{Binding Path=InputMessageContent}" TextWrapping="Wrap" AutomationProperties.AutomationId="inputMessageContent"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneItemStyle" TargetType="spreadsheetControls:CommentsTaskPaneItem">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Margin" Value="0 0 0 10"/>
    <Setter Property="MinWidth" Value="{StaticResource CommentMinWidth}"/>
    <Setter Property="MinHeight" Value="{StaticResource TaskPaneCommentMinHeight}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneItem">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ItemsControl
                      Grid.Row="0"
                      Margin="0 -1 0 0"
                      ItemsSource="{Binding CommentEntriesViewModels}"
                      ItemTemplate="{StaticResource CommentEntryItemTemplate}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                <Grid Margin="10">
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource InversedBoolToVisibilityValueConverter}}">
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBox
                            Name="PART_ReplyTextBox"
                            Grid.Row="0"
                            Text="{Binding EnteredText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            TextWrapping="Wrap"
                            AcceptsReturn="True"
                            MaxLines="5"
                            IsEnabled="{Binding IsReplyTextBoxEnabled}">
                      <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxGotFocusCommand}" EventName="GotFocus"/>
                        <telerik:EventBinding Command="{Binding ReplyTextBoxLostFocusCommand}" EventName="LostFocus"/>
                      </telerik:EventToCommandBehavior.EventBindings>
                    </TextBox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 10 0 0" Visibility="{Binding AreReplyButtonsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}">
                      <telerik:RadButton x:Name="SendButton"
                              Style="{StaticResource CommentReplyButtonStyle}"
                              Padding="0"
                              MinWidth="32"
                              Command="{Binding SendClickCommand}"
                              IsEnabled="{Binding IsAnyEnteredText}"
                              Margin="0 0 4 0">
                        <Path
                                Fill="{Binding ElementName=SendButton, Path=Foreground}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M0.9,9.0 L18,9.0 0,16.5 z M0,0 L18,7.4 0.9,7.4 z"
                                Width="14"
                                Height="11"
                                Stretch="Fill"/>
                      </telerik:RadButton>
                      <telerik:RadButton x:Name="CancelButton" Style="{StaticResource CommentReplyButtonStyle}" Padding="0" MinWidth="32" Command="{Binding CancelClickCommand}">
                        <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                      </telerik:RadButton>
                    </StackPanel>
                  </Grid>
                  <Grid Visibility="{Binding IsResolved, Converter={StaticResource BoolToVisibilityValueConverter}}">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                      <telerik:RadButton Content="Reopen thread" MinWidth="100" Command="{Binding ReopenThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                      <telerik:RadButton Content="Delete thread" MinWidth="100" Command="{Binding DeleteThreadClickCommand}" IsBackgroundVisible="False" Cursor="Hand"/>
                    </StackPanel>
                  </Grid>
                </Grid>
              </Border>
              <Grid Grid.Row="2" Margin="10 0 10 10" Visibility="{Binding IsCommentPending, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <telerik:Label
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_PostComment"
                        Foreground="{StaticResource CommentInfoMessageBrush}"
                        VerticalAlignment="Center"
                        Padding="0"/>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TaskPaneStyle" TargetType="spreadsheetControls:TaskPane">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0 1 1 0"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:TaskPane">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid Margin="0 0 0 10">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label Content="{Binding Title, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center" Padding="0"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
                </telerik:RadButton>
              </Grid>
              <ContentPresenter Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CommentsTaskPaneContentStyle" TargetType="spreadsheetControls:CommentsTaskPaneContent">
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}"/>
    <Setter Property="Padding" Value="10"/>
    <Setter Property="Visibility" Value="Visible"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:CommentsTaskPaneContent">
          <Grid>
            <telerik:RadListBox x:Name="PART_CommentsTaskPaneRadListBox"
                    ItemsSource="{Binding CommentItems}"
                    ItemContainerStyle="{StaticResource CommentsTaskPaneThreadItemStyle}"
                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                    Padding="0"
                    BorderThickness="0"
                    Background="{x:Null}"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.CanContentScroll="False"
                    IsScrollIntoViewEnabled="True"
                    IsSynchronizedWithCurrentItem="True"
                    VirtualizingStackPanel.IsVirtualizing="False">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <spreadsheetControls:CommentsTaskPaneItem DataContext="{Binding}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <telerik:Label
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_CommentsTaskPane_NoComments"
                    VerticalAlignment="Top"
                    Padding="0"
                    Visibility="{Binding CommentItems.Count, Converter={StaticResource NumberOfRecordsToVisibilityConverter}}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikControls:RadSpreadsheet" BasedOn="{StaticResource RadSpreadsheetStyle}"/>
  <Style TargetType="worksheet:NormalWorksheetEditorPresenter" BasedOn="{StaticResource NormalWorksheetEditorPresenterStyle}"/>
  <Style TargetType="worksheet:WorksheetPrintPresenter" BasedOn="{StaticResource WorksheetPrintPresenterStyle}"/>
  <Style TargetType="worksheetMargins:SelectAllControl" BasedOn="{StaticResource SelectAllControlStyle}"/>
  <Style TargetType="worksheet:RadWorksheetEditor" BasedOn="{StaticResource RadWorksheetEditorStyle}"/>
  <Style TargetType="worksheetMargins:ResizeThumb" BasedOn="{StaticResource ResizeThumbStyle}"/>
  <Style TargetType="worksheetMargins:UnhideThumb" BasedOn="{StaticResource UnhideThumbStyle}"/>
  <Style TargetType="worksheetMargins:RowHeading" BasedOn="{StaticResource RowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:ColumnHeading" BasedOn="{StaticResource ColumnHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintRowHeading" BasedOn="{StaticResource PrintRowHeadingStyle}"/>
  <Style TargetType="worksheetMargins:PrintColumnHeading" BasedOn="{StaticResource PrintColumnHeadingStyle}"/>
  <Style TargetType="worksheet:CellEditor" BasedOn="{StaticResource CellEditorStyle}"/>
  <Style TargetType="spreadsheetControls:PatternFillControl" BasedOn="{StaticResource PatternFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:GradientFillControl" BasedOn="{StaticResource GradientFillControlStyle}"/>
  <Style TargetType="spreadsheetControls:SheetSelectorTabItem" BasedOn="{StaticResource SheetSelectorTabItemStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetSheetSelector" BasedOn="{StaticResource RadSpreadsheetSheetSelectorStyle}"/>
  <Style TargetType="spreadsheetControls:PrintPreviewControl" BasedOn="{StaticResource PrintPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NameBox" BasedOn="{StaticResource NameBoxStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetFormulaBar" BasedOn="{StaticResource RadSpreadsheetFormulaBarStyle}"/>
  <Style TargetType="spreadsheetControls:ScaleFactorSlider" BasedOn="{StaticResource ScaleFactorSliderStyle}"/>
  <Style TargetType="spreadsheetControls:RadSpreadsheetStatusBar" BasedOn="{StaticResource RadSpreadsheetStatusBarStyle}"/>
  <Style TargetType="spreadsheetControls:SpreadsheetGridSplitter" BasedOn="{StaticResource SpreadsheetGridSplitterStyle}"/>
  <Style TargetType="spreadsheetControls:StyleGallery" BasedOn="{StaticResource StyleGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:ThemeGallery" BasedOn="{StaticResource ThemeGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:LargeThemePreviewControl" BasedOn="{StaticResource LargeThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemePreviewControl" BasedOn="{StaticResource SmallThemePreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:ColorGallery" BasedOn="{StaticResource ColorGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeColorPreviewControl" BasedOn="{StaticResource SmallThemeColorPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:FontGallery" BasedOn="{StaticResource FontGalleryStyle}"/>
  <Style TargetType="spreadsheetControls:SmallThemeFontPreviewControl" BasedOn="{StaticResource SmallThemeFontPreviewControlStyle}"/>
  <Style TargetType="spreadsheetControls:NumberFormatAutoCompleteComboBox" BasedOn="{StaticResource NumberFormatAutoCompleteComboBoxControlStyle}"/>
  <Style TargetType="spreadsheetControls:BordersMenu" BasedOn="{StaticResource BordersMenuStyle}"/>
  <Style TargetType="spreadsheetControls:FunctionsMenu" BasedOn="{StaticResource FunctionsMenuStyle}"/>
  <Style TargetType="spreadsheetControls:AdornerControl" BasedOn="{StaticResource AdornerControlStyle}"/>
  <Style TargetType="spreadsheetControls:FilteringPopupControl" BasedOn="{StaticResource FilteringPopupControlStyle}"/>
  <Style TargetType="spreadsheetControls:DataValidationInputMessageControl" BasedOn="{StaticResource DataValidationInputMessageControlStyle}"/>
  <Style TargetType="spreadsheetControls:AutomatedListBox" BasedOn="{StaticResource ListBoxStyle}"/>
  <Style TargetType="spreadsheetControls:TaskPane" BasedOn="{StaticResource TaskPaneStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneContent" BasedOn="{StaticResource CommentsTaskPaneContentStyle}"/>
  <Style TargetType="spreadsheetControls:CommentsTaskPaneItem" BasedOn="{StaticResource CommentsTaskPaneItemStyle}"/>
  <telerik:LocalizationManager x:Key="localizationManager"/>
  <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
  <Style x:Key="HeaderTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontWeight" Value="SemiBold"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Margin" Value="0 0 0 5"/>
  </Style>
  <Style x:Key="FillEffectsDialogContentStyle" TargetType="dialogs:FillEffectsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FillEffectsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="527"/>
    <Setter Property="MinHeight" Value="490"/>
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillEffectsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_GradientTab" MinWidth="55">
                <Grid Margin="5">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Margin="5" Grid.ColumnSpan="3">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Colors" Margin="5 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color1" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color1Selector"
                            SelectedColor="{Binding Path=Color1, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Color2" Foreground="{TemplateBinding Foreground}" Margin="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Color2Selector"
                            SelectedColor="{Binding Path=Color2, Mode=TwoWay}"
                            HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                            MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                            MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                            HorizontalAlignment="Left"
                            Width="122"
                            Margin="5 0 0 0"/>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_ShadingStyles" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <Border BorderThickness="1" Padding="5" BorderBrush="{TemplateBinding BorderBrush}">
                      <StackPanel>
                        <RadioButton x:Name="HorizontalGradient"
                                GroupName="1"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Horizontal}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Horizontal"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="VerticalGradient"
                                GroupName="2"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=Vertical}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Vertical"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalUpGradient"
                                GroupName="3"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalUp}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalUp"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="DiagonalDownGradient"
                                GroupName="4"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=DiagonalDown}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_DiagonalDown"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCornerGradient"
                                GroupName="5"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCorner}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCorner"
                                Margin="0 0 0 2"/>
                        <RadioButton x:Name="FromCenterGradient"
                                GroupName="6"
                                IsChecked="{Binding Path=SelectedShadingStyle, Mode=TwoWay, Converter={StaticResource ShadingStyleToBooleanConverter}, ConverterParameter=FromCenter}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_FromCenter"
                                Margin="0 0 0 2"/>
                      </StackPanel>
                    </Border>
                  </StackPanel>
                  <StackPanel Grid.Row="1" Grid.Column="1" Margin="40 5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Variants" Margin="0 0 0 10" Style="{StaticResource HeaderTextBlockStyle}"/>
                    <telerik:RadListBox x:Name="ListBoxGradients"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Stretch"
                            ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                            ScrollViewer.VerticalScrollBarVisibility="Hidden"
                            SelectedIndex="{Binding Path=SelectedGradientTypeIndex, Mode=TwoWay}"
                            ItemsSource="{Binding Path=GradientTypes}"
                            Width="135"
                            Padding="4">
                      <telerik:RadListBox.ItemContainerStyle>
                        <Style TargetType="telerik:RadListBoxItem">
                          <Setter Property="Background" Value="Transparent"/>
                          <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Margin" Value="2"/>
                          <Setter Property="Padding" Value="1"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="telerik:RadListBoxItem">
                                <Grid>
                                  <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                          <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverBorder"/>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                      <VisualState x:Name="Unselected"/>
                                      <VisualState x:Name="Selected">
                                        <Storyboard>
                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                              <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                              </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                          </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                      </VisualState>
                                    </VisualStateGroup>
                                  </VisualStateManager.VisualStateGroups>
                                  <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                  <Border x:Name="SelectedBorder" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                                  <Border x:Name="MouseOverBorder" Opacity="0" BorderBrush="{telerik:Windows11Resource ResourceKey=MouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                </Grid>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </telerik:RadListBox.ItemContainerStyle>
                      <telerik:RadListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                          <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Top" Width="124" Height="124"/>
                        </ItemsPanelTemplate>
                      </telerik:RadListBox.ItemsPanel>
                      <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                          <spreadsheetControls:GradientFillControl
                                  ColorScheme="{Binding Path=DataContext.ColorPalette.ColorScheme, ElementName=ListBoxGradients}"
                                  GradientType="{Binding}"
                                  Width="55"
                                  Height="55"
                                  Color1="{Binding Path=DataContext.Color1, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"
                                  Color2="{Binding Path=DataContext.Color2, ElementName=ListBoxGradients, Converter={StaticResource ColorToThemableColorConverter}}"/>
                        </DataTemplate>
                      </telerik:RadListBox.ItemTemplate>
                    </telerik:RadListBox>
                  </StackPanel>
                  <StackPanel Grid.Column="2" Grid.Row="1" Margin="5">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FillEffectsDialog_Sample" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 0 0 10"/>
                    <spreadsheetControls:GradientFillControl
                            ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                            GradientType="{Binding Path=GradientType}"
                            Color1="{Binding Path=DataContext.Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                            Color2="{Binding Path=DataContext.Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                            Width="70"
                            Height="70"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <charts:IconResourceConverter x:Key="IconResourceConverter"/>
  <DataTemplate x:Key="ChartTypeItemTemlate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="16" Height="16"/>
      <TextBlock Text="{Binding Name}" Grid.Column="1" Margin="5 2 0 2"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ChartChildTypeItemTemlate">
    <Image Source="{Binding ImageRelativePath, Converter={StaticResource ResourceKey=IconResourceConverter}}" Width="56" Height="56" SnapsToDevicePixels="True"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryHorizontalTemplate">
    <charts:HorizontalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="CategoryVerticalTemplate">
    <charts:VerticalCategoryChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="PieTemplate">
    <charts:PieChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="HorizontalDateTimeChartTemplate">
    <charts:HorizontalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="VerticalDateTimeChartTemplate">
    <charts:VerticalDateTimeChart MinHeight="260"/>
  </DataTemplate>
  <DataTemplate x:Key="ScatterChartTemplate">
    <charts:ScatterChart MinHeight="260"/>
  </DataTemplate>
  <charts:ChartTemplateSelector x:Key="chartSelector"
          HorizontalCategoryChartTemplate="{StaticResource CategoryHorizontalTemplate}"
          VerticalCategoryChartTemplate="{StaticResource CategoryVerticalTemplate}"
          PieChartTemplate="{StaticResource PieTemplate}"
          HorizontalDateTimeChartTemplate="{StaticResource HorizontalDateTimeChartTemplate}"
          VerticalDateTimeChartTemplate="{StaticResource VerticalDateTimeChartTemplate}"
          ScatterChartTemplate="{StaticResource ScatterChartTemplate}"/>
  <Style x:Key="InsertChartDialogContentStyle" TargetType="dialogs:InsertChartDialogContent">
    <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="Height" Value="600"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertChartDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3" Background="{Binding ElementName=chartTypeModelsListBox, Path=Background}"/>
            <TextBlock
                    Text="{telerik:LocalizableResource Key=Spreadsheet_InsertChartDialog_SubHeader}"
                    FontSize="{telerik:Windows11Resource ResourceKey=FontSizeL}"
                    FontWeight="Bold"
                    Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Margin="16 15"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}" Grid.Row="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="170"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Border
                      Grid.Column="1"
                      Grid.Row="0"
                      Grid.RowSpan="2"
                      Background="{TemplateBinding Background}"
                      BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                      BorderBrush="{Binding ElementName=chartTypeModelsListBox, Path=BorderBrush}"/>
              <telerik:RadListBox x:Name="chartTypeModelsListBox"
                      Grid.RowSpan="2"
                      Padding="0"
                      ItemsSource="{Binding ChartTypeModels}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      ItemTemplate="{StaticResource ChartTypeItemTemlate}"
                      SelectedItem="{Binding SelectedChartModel, Mode=TwoWay}"/>
              <Rectangle Margin="10 0" VerticalAlignment="Bottom" Height="1" Grid.Column="1" Fill="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" HorizontalAlignment="Stretch"/>
              <telerik:RadListBox x:Name="chartTypesListBox"
                      Grid.Column="1"
                      ItemsSource="{Binding SelectedChartModel.ChildTypes}"
                      ItemTemplate="{StaticResource ChartChildTypeItemTemlate}"
                      HorizontalAlignment="Stretch"
                      Margin="10"
                      SelectedItem="{Binding SelectedChartModel.SelectedChildModel, Mode=TwoWay}"
                      BorderThickness="0"
                      Background="{x:Null}"
                      VerticalAlignment="Top"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <telerik:RadListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                  </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
              </telerik:RadListBox>
              <StackPanel Grid.Column="1" Grid.Row="1" Margin="10">
                <TextBlock FontSize="16" Text="{Binding SelectedChartModel.SelectedChildModel.Name}" Margin="0 0 0 15"/>
                <telerik:RadListBox
                        ItemsSource="{Binding SelectedChartModel.SelectedChildModel.ChartControlViewModels}"
                        SelectedItem="{Binding SelectedChartModel.SelectedChildModel.SelectedChartControlModel, Mode=TwoWay}"
                        Padding="0"
                        BorderThickness="0"
                        Background="{x:Null}"
                        ItemTemplateSelector="{StaticResource chartSelector}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled">
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <UniformGrid Columns="2"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                </telerik:RadListBox>
              </StackPanel>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" Margin="10 0" MinWidth="60" x:Name="PART_ButtonOK"/>
                <telerik:RadButton Content="Cancel" MinWidth="60" x:Name="PART_ButtonCancel"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Resources>
      <Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
        <Setter Property="Padding" Value="5"/>
      </Style>
    </Style.Resources>
  </Style>
  <Style x:Key="GeneralCategoryContentStyle" TargetType="dialogs:GeneralCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:GeneralCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_GeneralInfo" Margin="2 8 0 8" TextWrapping="Wrap"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberCategoryContentStyle" TargetType="dialogs:NumberCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown VerticalAlignment="Top" Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_UseSeparator" IsChecked="{Binding UseThousandSeparator, Mode=TwoWay}" Margin="2 10 5 9"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 3 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    VerticalAlignment="Top"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ItemsSource="{Binding NumberItems}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    Height="150"
                    Margin="0 5 0 0">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CurrencyCategoryContentStyle" TargetType="dialogs:CurrencyCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CurrencyCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
                <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
              </StackPanel>
              <Grid Margin="2 7 0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
                <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                  <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                        <TextBlock Text="{Binding Culture.DisplayName}"/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:RadComboBox.ItemTemplate>
                </telerik:RadComboBox>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_NegativeNumbers" Margin="2 0 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding NumberItems}"
                    SelectedValue="{Binding SelectedNumberItem, Mode=TwoWay}"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                    VerticalAlignment="Top"
                    Height="150"
                    Margin="0 5 0 0"
                    BorderThickness="1">
              <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                  <TextBlock Text="{Binding Text}" Foreground="{Binding Foreground}"/>
                </DataTemplate>
              </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AccountingCategoryContentStyle" TargetType="dialogs:AccountingCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AccountingCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
            <Grid Margin="2 6 0 5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Symbol" Margin="0 5"/>
              <telerik:RadComboBox Grid.Column="1" SelectedValue="{Binding SelectedCurrencyInfo, Mode=TwoWay}" ItemsSource="{Binding CurrencyInfos}" VerticalAlignment="Top" Margin="3 0 0 0">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                      <TextBlock Text="{Binding CurrencySymbol}" Width="37"/>
                      <TextBlock Text="{Binding Culture.DisplayName}"/>
                    </StackPanel>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DateCategoryContentStyle" TargetType="dialogs:DateCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DateCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 5 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5 0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TimeCategoryContentStyle" TargetType="dialogs:TimeCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TimeCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DateTimeItems}"
                    DisplayMemberPath="Text"
                    BorderThickness="1"
                    SelectedItem="{Binding SelectedDateTimeItem, Mode=TwoWay}"
                    Grid.Row="1"
                    Height="150"
                    Margin="2 2 0 0"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" ItemsSource="{Binding CultureInfos}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PercentageCategoryContentStyle" TargetType="dialogs:PercentageCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PercentageCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 2 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FractionCategoryContentStyle" TargetType="dialogs:FractionCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FractionCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 5"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding DisplayNameToFractionFormatStrings}"
                    Grid.Row="1"
                    DisplayMemberPath="Key"
                    BorderThickness="1"
                    SelectedValuePath="Value"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Height="150"
                    Margin="2 0 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScientificCategoryContentStyle" TargetType="dialogs:ScientificCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScientificCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <StackPanel Orientation="Horizontal" Margin="2 5 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_DecimalPlaces" VerticalAlignment="Center" Margin="0 5 0 0"/>
              <telerik:RadNumericUpDown Minimum="0" Value="{Binding DecimalPlaces, Mode=TwoWay}" VerticalAlignment="Top" IsInteger="True" Width="110" Margin="3 0 0 0"/>
            </StackPanel>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TextCategoryContentStyle" TargetType="dialogs:TextCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TextCategoryContent">
          <StackPanel Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
              <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
            </telerik:GroupBox>
            <TextBlock TextWrapping="Wrap" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_TextInfo" Margin="2 8 0 8"/>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SpecialCategoryContentStyle" TargetType="dialogs:SpecialCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SpecialCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 4 0 2"/>
            </StackPanel>
            <telerik:RadListBox
                    ItemsSource="{Binding SelectedFormatInfos}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="FormatString"
                    SelectedValue="{Binding SelectedFormat, Mode=TwoWay}"
                    Grid.Row="1"
                    BorderThickness="1"
                    Margin="2 2 0 0"
                    Height="150"/>
            <StackPanel Grid.Row="2" Margin="2 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Locale" Margin="0 5"/>
              <telerik:RadComboBox ItemsSource="{Binding CultureInfos}" SelectedValue="{Binding SelectedCulture, Mode=TwoWay}" DisplayMemberPath="DisplayName"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomCategoryContentStyle" TargetType="dialogs:CustomCategoryContent">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomCategoryContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Sample" MinHeight="70" Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock Text="{Binding Path=SampleValue}" Margin="5 5 5 0"/>
              </telerik:GroupBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Type" Margin="2 5 0 0"/>
              <TextBox Text="{Binding SelectedFormatString, Mode=TwoWay}" Margin="2 5 0 0"/>
            </StackPanel>
            <telerik:RadListBox
                    Grid.Row="1"
                    ItemsSource="{Binding FormatStrings}"
                    BorderThickness="1"
                    SelectedValue="{Binding SelectedFormatString, Mode=TwoWay}"
                    Margin="2 2 0 0"
                    VerticalAlignment="Top"
                    MaxHeight="150"/>
            <telerik:RadButton x:Name="deleteButton"
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Delete"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="0 8 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NumberTabContentStyle" TargetType="dialogs:NumberTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Height" Value="450"/>
    <Setter Property="Width" Value="550"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NumberTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Category" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox
                      ItemsSource="{Binding Path=Categories}"
                      SelectedItem="{Binding Path=SelectedCategory, Mode=TwoWay}"
                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                      HorizontalAlignment="Left"
                      Margin="0 3 0 0"
                      Width="110"
                      Height="404">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource FormatStringCategoryToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
            </StackPanel>
            <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Path=CategoryContent}" Margin="10 16 10 10"/>
            <TextBlock Text="{Binding Path=CategoryContent.Info}" TextWrapping="Wrap" Grid.Row="1" Grid.ColumnSpan="2" Margin="0 10 0 0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="AlignmentTabContentStyle" TargetType="dialogs:AlignmentTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlignmentTabContent">
          <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
            <Border Background="{TemplateBinding Background}"/>
            <StackPanel>
              <StackPanel Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextAlignment" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 0">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="145"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <StackPanel Grid.Column="0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Horizontal" Padding="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="HorizontalAlignmentCombobox" ItemsSource="{Binding Path=HorizontalAlignments}" SelectedItem="{Binding Path=SelectedHorizontalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadHorizontalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Vertical" Padding="{StaticResource GeneralLabelOffset}" Margin="{StaticResource GeneralLabelOffset}"/>
                    <telerik:RadComboBox x:Name="VerticalAlignmentCombobox" ItemsSource="{Binding Path=VerticalAlignments}" SelectedItem="{Binding Path=SelectedVerticalAlignment, Mode=TwoWay}">
                      <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                          <TextBlock Text="{Binding Converter={StaticResource RadVerticalAlignmentToStringConverter}}"/>
                        </DataTemplate>
                      </telerik:RadComboBox.ItemTemplate>
                    </telerik:RadComboBox>
                  </StackPanel>
                  <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="15 0 0 0">
                    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Indent" Padding="{StaticResource GeneralLabelOffset}" IsEnabled="{Binding Path=IsIndentEnabled}"/>
                    <telerik:RadNumericUpDown HorizontalAlignment="Left" Maximum="250" Minimum="0" Value="{Binding Path=Indent, Mode=TwoWay}" Width="120"/>
                  </StackPanel>
                </Grid>
              </StackPanel>
              <StackPanel Margin="0 10 0 0" Orientation="Horizontal">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_TextControl" Style="{StaticResource HeaderTextBlockStyle}" Margin="0 2"/>
              </StackPanel>
              <StackPanel Margin="0">
                <CheckBox x:Name="WrapText"
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_WrapText"
                        IsChecked="{Binding Path=IsWrapped, Mode=TwoWay}"/>
                <CheckBox
                        Margin="{StaticResource GeneralLabelOffset}"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_MergeCells"
                        IsEnabled="{Binding Path=IsMergingEnabled}"
                        IsChecked="{Binding Path=IsMerged, Mode=TwoWay}"/>
              </StackPanel>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FontTabContentStyle" TargetType="dialogs:FontTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimarySolidBorderBrush}"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FontTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="16 12 16 0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="250"/>
              <ColumnDefinition Width="110"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Font" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontFamilyTextBox" TabIndex="0" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontFamilyListBox"
                      IsTabStop="False"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                      ItemsSource="{Binding Path=FontFamilyInfos}"
                      SelectedItem="{Binding Path=FontFamilyInfo, Mode=TwoWay}"
                      Height="140">
                <telerik:RadListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                      </Grid.ColumnDefinitions>
                      <TextBlock Text="{Binding Path=FontFamily.Source}" FontFamily="{Binding Path=FontFamily}"/>
                      <TextBlock Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" FontFamily="{Binding Path=FontFamily}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
              </telerik:RadListBox>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Underline" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadComboBox x:Name="UnderlineCombobox" ItemsSource="{Binding Path=UnderlineTypes}" SelectedItem="{Binding Path=UnderlineType, Mode=TwoWay}" TabIndex="3">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource UnderlineTypesToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" Margin="10 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontStyleTextBox" TabIndex="1" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontStyleListBox" IsTabStop="False" ItemsSource="{Binding Path=FontStyles}" SelectedItem="{Binding Path=SelectedFontStyle, Mode=TwoWay}" Height="140"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ForeColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=ForeColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      TabIndex="4"
                      MinHeight="32"
                      HorizontalAlignment="Left"/>
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="0" Margin="10 0 5 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Size" Margin="{StaticResource GeneralLabelOffset}"/>
              <TextBox x:Name="FontSizeTextBox" TabIndex="2" Margin="0 0 0 8"/>
              <telerik:RadListBox x:Name="FontSizeListBox" IsTabStop="False" ItemsSource="{Binding Path=FontSizes}" SelectedItem="{Binding Path=SelectedFontSize, Mode=TwoWay}" Height="140"/>
              <CheckBox x:Name="NormalFontCheckBox" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_NormalFont" TabIndex="5" Margin="0 29 0 0"/>
            </StackPanel>
            <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Margin="0 8 0 0" MaxWidth="585">
              <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition MinHeight="80"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Preview" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border
                      Grid.Row="1"
                      BorderThickness="1"
                      Height="100"
                      BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      Background="{telerik:Windows11Resource ResourceKey=PrimaryBackgroundBrush}">
                <TextBlock x:Name="SampleTextBlock"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_AaBbCcYyZz"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        TextWrapping="NoWrap"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
              </Border>
            </Grid>
            <TextBlock
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_FontInfo"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Left"
                    TextWrapping="Wrap"
                    Margin="{StaticResource FormatCellsTabContentHelpTextMargin}"
                    MaxWidth="505"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TransparentToggleButton" TargetType="telerik:RadToggleButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderStyleSelectorStyle" TargetType="dialogs:BorderStyleSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderStyleSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="0 0 8 0">
            <StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Line" Margin="{StaticResource GeneralLabelOffset}" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Style" Margin="{StaticResource GeneralLabelOffset}"/>
              <Border>
                <telerik:RadListBox x:Name="ListBoxBorders"
                        ItemsSource="{Binding Path=BorderStylesToLine}"
                        SelectedIndex="{Binding Path=SelectedBorderStyleIndex, Mode=TwoWay}"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        ScrollViewer.VerticalScrollBarVisibility="Hidden"
                        HorizontalAlignment="Left"
                        Height="184"
                        Width="150">
                  <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                      <Grid Height="9">
                        <Line
                                StrokeDashArray="{Binding StrokeDashArray}"
                                StrokeThickness="{Binding Thickness}"
                                Stroke="{Binding ElementName=ColorSelector, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}"
                                X1="{Binding X1}"
                                Y1="{Binding Y1}"
                                X2="{Binding X2}"
                                Y2="{Binding Y2}"
                                HorizontalAlignment="Center"
                                Visibility="{Binding LineVisibility}"/>
                        <TextBlock
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{Binding TextBlockVisibility}"
                                Width="47"
                                FontSize="10"/>
                      </Grid>
                    </DataTemplate>
                  </telerik:RadListBox.ItemTemplate>
                  <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                      <telerik:RadWrapPanel
                              Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                              VerticalAlignment="Top"
                              Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                  </telerik:RadListBox.ItemsPanel>
                  <telerik:RadListBox.Resources>
                    <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}">
                      <Setter Property="Height" Value="32"/>
                      <Setter Property="Width" Value="74"/>
                    </Style>
                  </telerik:RadListBox.Resources>
                </telerik:RadListBox>
              </Border>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Color" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="ColorSelector"
                      IsTabStop="False"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      SelectedColor="{Binding Path=SelectedColor, Mode=TwoWay}"
                      Width="150"
                      Height="32"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderSelectorStyle" TargetType="dialogs:BorderSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderSelector">
          <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Presets" Style="{StaticResource HeaderTextBlockStyle}" Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="1" HorizontalAlignment="Left" MinWidth="150">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <StackPanel VerticalAlignment="Center">
                <telerik:RadButton
                        Command="{Binding Path=SetNoBorderCommand}"
                        x:Name="ButtonNoBorder"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/noBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_None" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0">
                <telerik:RadButton x:Name="ButtonOutlineBorder"
                        Command="{Binding Path=SetOutsideBorderCommand}"
                        IsTabStop="False"
                        Width="36"
                        Height="36"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/outsideBorders.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Outline" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Grid.Column="2" VerticalAlignment="Center">
                <telerik:RadButton x:Name="ButtonInsideBorder"
                        Command="{Binding Path=SetInsideBorderCommand}"
                        IsTabStop="False"
                        Width="37"
                        Height="37"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="32" Source="{telerik:IconResource IconRelativePath=32/insideBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadButton>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Inside" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
            </Grid>
            <TextBlock
                    Grid.Row="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Border"
                    Style="{StaticResource HeaderTextBlockStyle}"
                    Margin="{StaticResource GeneralLabelOffset}"/>
            <Grid Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="128">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibility"
                        Grid.Row="0"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/topBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibility"
                        Grid.Row="1"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideHorizontalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibility"
                        Grid.Row="2"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalUpBorderVisibility"
                      Grid.Column="0"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                      Width="23"
                      Height="23"
                      Padding="0"
                      IsTabStop="False"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalUp.png, IconSources={StaticResource IconPaths}}" UseLayoutRounding="False"/>
              </telerik:RadToggleButton>
              <Grid Grid.Row="2" Grid.Column="2">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibility"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/leftBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibility"
                        Grid.Column="1"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        telerik:RadDockPanel.Dock="Left"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/insideVerticalBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibility"
                        Grid.Column="2"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        IsTabStop="False"
                        Width="23"
                        Height="23"
                        Padding="0"
                        helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                  <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/rightBorder.png, IconSources={StaticResource IconPaths}}"/>
                </telerik:RadToggleButton>
              </Grid>
              <telerik:RadToggleButton x:Name="ToggleButtonDiagonalDownBorderVisibility"
                      Grid.Column="4"
                      Grid.Row="2"
                      Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                      IsTabStop="False"
                      Width="23"
                      Height="23"
                      Padding="0"
                      helpers:ThemeHelper.MouseOverBrush="{telerik1:Windows11Resource ResourceKey=MouseOverBackgroundBrush}">
                <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/diagonalDown.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadToggleButton>
              <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="30"/>
                  <RowDefinition Height="8"/>
                  <RowDefinition Height="8"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="9"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="54"/>
                  <ColumnDefinition Width="8"/>
                  <ColumnDefinition Width="9"/>
                </Grid.ColumnDefinitions>
                <dialogs:BordersPreview x:Name="BordersPreview"
                        Grid.ColumnSpan="7"
                        Grid.RowSpan="7"
                        SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                        SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                        DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                        DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                        TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                        RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                        BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                        LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                        InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                        InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                        ColorPalette="{Binding Path=ColorPalette}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-61" CenterY="93"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownRight"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="47" CenterY="42"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="7" CenterY="75"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="52" CenterY="22"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-25" CenterY="-38"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsUpLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="21" CenterY="14"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-94" CenterY="-20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="80"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineFourCellsDownLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=FourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="16" CenterY="33"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-23" CenterY="15"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsUp"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="67" CenterY="18"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="17" CenterX="-148" CenterY="39"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="138"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowHorizontalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoVerticalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="163" CenterX="64" CenterY="37"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="-10" CenterY="-6"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsLeft"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="26" CenterY="20"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="51" CenterX="20" CenterY="59"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="105"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineTowVerticalCellsRight"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=TwoHorizontalCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="129" CenterX="58" CenterY="35"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalDownBorderCommand}"
                        x:Name="ToggleButtonDownBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="31" CenterX="-7" CenterY="26"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Width="150"
                        Height="9"
                        Grid.Row="6"
                        Grid.ColumnSpan="7"
                        Command="{Binding Path=ToggleDiagonalUpBorderCommand}"
                        x:Name="ToggleButtonUpBorderVisibilityLineOneOrFourCells"
                        Style="{StaticResource TransparentToggleButton}"
                        Visibility="{Binding Path=OneOrFourCellsDiagonalsVisibility}">
                  <telerik:RadToggleButton.RenderTransform>
                    <RotateTransform Angle="149" CenterX="82" CenterY="-19"/>
                  </telerik:RadToggleButton.RenderTransform>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideHorizontalBorderVisibilityLine"
                        Grid.Row="3"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleInsideHorizontalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonInsideVerticalBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="3"
                        Grid.RowSpan="4"
                        Command="{Binding Path=ToggleInsideVerticalBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonLeftBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="1"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleLeftBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonTopBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleTopBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonRightBorderVisibilityLine"
                        Grid.Row="1"
                        Grid.Column="5"
                        Grid.RowSpan="5"
                        Command="{Binding Path=ToggleRightBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
                <telerik:RadToggleButton x:Name="ToggleButtonBottomBorderVisibilityLine"
                        Grid.Row="5"
                        Grid.Column="2"
                        Grid.ColumnSpan="3"
                        Command="{Binding Path=ToggleBottomBorderCommand}"
                        Style="{StaticResource TransparentToggleButton}"/>
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="BorderTabContentStyle" TargetType="dialogs:BorderTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="534"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:BorderTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="8" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="150"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <dialogs:BorderStyleSelector x:Name="TableBorderSelector" CurrentBorder="{Binding Path=CurrentBorder, Mode=TwoWay}" ColorPalette="{Binding Path=ColorPalette}"/>
            <dialogs:BorderSelector x:Name="BorderSelector"
                    Grid.Column="1"
                    UseLayoutRounding="True"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    LeftBorder="{Binding Path=LeftBorder, Mode=TwoWay}"
                    TopBorder="{Binding Path=TopBorder, Mode=TwoWay}"
                    RightBorder="{Binding Path=RightBorder, Mode=TwoWay}"
                    BottomBorder="{Binding Path=BottomBorder, Mode=TwoWay}"
                    InsideHorizontalBorder="{Binding Path=InsideHorizontalBorder, Mode=TwoWay}"
                    InsideVerticalBorder="{Binding Path=InsideVerticalBorder, Mode=TwoWay}"
                    DiagonalDownBorder="{Binding Path=DiagonalDownBorder, Mode=TwoWay}"
                    DiagonalUpBorder="{Binding Path=DiagonalUpBorder, Mode=TwoWay}"
                    SelectedColumnsCount="{Binding Path=SelectedColumnsCount}"
                    SelectedRowsCount="{Binding Path=SelectedRowsCount}"
                    CurrentBorder="{Binding Path=CurrentBorder}"
                    ColorPalette="{Binding Path=ColorPalette}"
                    Margin="16 0 0 0"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    TextWrapping="Wrap"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Info"
                    Margin="{StaticResource GeneralLabelOffset}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PatternFillControlsBaseStyle" TargetType="spreadsheetControls:PatternFillControl">
    <Setter Property="Padding" Value="2 1"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="spreadsheetControls:PatternFillControl">
          <Border MinHeight="22" BorderThickness="1" BorderBrush="Transparent" Background="{Binding ElementName=Container, Path=Background}">
            <Canvas x:Name="Container"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FillTabContentStyle" TargetType="dialogs:FillTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FillTabContent">
          <Grid Margin="0 8">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="75"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
            <StackPanel HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_BackgroundColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadToggleButton x:Name="ButtonNoColor" Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_NoColor"/>
              <telerik:RadColorSelector x:Name="BackgroundColorSelector"
                      AutomaticColor="White"
                      Background="Transparent"
                      BorderThickness="0"
                      SelectedColor="{Binding Path=BackgroundColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Style="{StaticResource RadColorSelectorStylePredefined}"/>
              <Grid Margin="0 8 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="FillEffectsButton" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_FillEffects" VerticalAlignment="Center" Width="110"/>
                <telerik:RadButton x:Name="MoreColorsButton"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_MoreColors"
                        HorizontalAlignment="Right"
                        Margin="5 0 0 0"
                        VerticalAlignment="Center"
                        Width="110"/>
              </Grid>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="16 0 0 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternColor" Margin="{StaticResource GeneralLabelOffset}"/>
              <spreadsheetControls:ColorSelectorDropDown x:Name="PatternsColorSelector"
                      AutomaticColor="Black"
                      SelectedColor="{Binding Path=PatternColor, Mode=TwoWay}"
                      HeaderPaletteItemsSource="{Binding Path=ColorPalette.HeaderPaletteItemsSource}"
                      MainPaletteItemsSource="{Binding Path=ColorPalette.MainPaletteItemsSource}"
                      MainPaletteOrientation="{Binding Path=ColorPalette.MainPaletteOrientation}"
                      Width="153"
                      Margin="{StaticResource GeneralLabelOffset}"
                      HorizontalAlignment="Left"
                      MinHeight="32"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_PatternStyle" Margin="{StaticResource GeneralLabelOffset}"/>
              <telerik:RadDropDownButton x:Name="PatternStyleSelector" Width="153" Padding="4 0 0 0" HorizontalAlignment="Left" MinHeight="32">
                <telerik:RadDropDownButton.DropDownContent>
                  <telerik:RadListBox x:Name="PatternListBox"
                          BorderThickness="0"
                          Width="240"
                          Height="125"
                          ItemsSource="{Binding Path=PatternTypes}"
                          SelectedIndex="{Binding Path=PatternType, Mode=TwoWay, Converter={StaticResource PatternTypeToIntConverter}}"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Hidden">
                    <telerik:RadListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <telerik:RadWrapPanel
                                Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                Height="{Binding (FrameworkElement.ActualHeight), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                VerticalAlignment="Top"
                                Orientation="Horizontal"/>
                      </ItemsPanelTemplate>
                    </telerik:RadListBox.ItemsPanel>
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <spreadsheetControls:PatternFillControl
                                spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
                                Height="24"
                                Width="24"
                                Padding="0"
                                ColorScheme="{Binding ElementName=PatternStyleSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                PatternType="{Binding}"
                                PatternColor="#FF000000"
                                BackgroundColor="#FFFFFFFF"
                                Style="{StaticResource PatternFillControlsBaseStyle}"/>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                  </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Content>
                  <spreadsheetControls:PatternFillControl x:Name="PatternDropDown"
                          Width="{Binding ElementName=PatternStyleSelector, Path=ActualWidth}"
                          PatternColor="{Binding Path=PatternColor, Converter={StaticResource ColorToThemableColorConverter}}"
                          BackgroundColor="#FFFFFFFF"
                          ColorScheme="{Binding Path=ColorPalette.ColorScheme}"
                          PatternType="{Binding Path=PatternType}"
                          Style="{StaticResource PatternFillControlsBaseStyle}"/>
                </telerik:RadDropDownButton.Content>
              </telerik:RadDropDownButton>
            </StackPanel>
            <telerik:GroupBox Grid.Row="1" Grid.ColumnSpan="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Sample">
              <Grid>
                <spreadsheetControls:PatternFillControl x:Name="SamplePattern"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternType="{Binding Path=PatternType, RelativeSource={RelativeSource TemplatedParent}}"
                        PatternColor="{Binding Path=PatternColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        BackgroundColor="{Binding Path=BackgroundColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToThemableColorConverter}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=PatternFillControl}"
                        Style="{StaticResource PatternFillControlsBaseStyle}"/>
                <spreadsheetControls:GradientFillControl x:Name="SampleGradient"
                        Color1="{Binding Path=Color1, Converter={StaticResource ColorToThemableColorConverter}}"
                        Color2="{Binding Path=Color2, Converter={StaticResource ColorToThemableColorConverter}}"
                        GradientType="{Binding Path=GradientType, RelativeSource={RelativeSource TemplatedParent}}"
                        ColorScheme="{Binding Path=ColorPalette.ColorScheme, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding Path=State, Converter={StaticResource FillTabStateToVisibilityConverter}, ConverterParameter=GradientFillControl}"/>
              </Grid>
            </telerik:GroupBox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectionTabContentStyle" TargetType="dialogs:ProtectionTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Width" Value="516"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectionTabContent">
          <Grid Background="{TemplateBinding Background}" Margin="0 8">
            <StackPanel>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Locked" IsChecked="{Binding Path=IsLocked, Mode=TwoWay}"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Info" Margin="5"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatCellsDialogContentStyle" TargetType="dialogs:FormatCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="MaxWidth" Value="800"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatCellsDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" MinWidth="537" MinHeight="486" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" x:Name="NumberTab" MinWidth="55">
                <dialogs:NumberTabContent x:Name="NumberTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header" x:Name="AlignmentTab" MinWidth="55">
                <dialogs:AlignmentTabContent x:Name="AlignmentTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header" x:Name="FontTab" MinWidth="55">
                <dialogs:FontTabContent x:Name="FontTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header" x:Name="BorderTab" MinWidth="55">
                <dialogs:BorderTabContent x:Name="BorderTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header" x:Name="FillTab" MinWidth="55">
                <dialogs:FillTabContent x:Name="FillTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header" x:Name="ProtectionTab" MinWidth="55">
                <dialogs:ProtectionTabContent x:Name="ProtectionTabContent" Margin="{StaticResource DialogsInnerContentMargin}"/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecimalNumberPromptDialogStyle" TargetType="dialogs:DecimalNumberPromptDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DecimalNumberPromptDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock VerticalAlignment="Center" Text="{Binding Path=LabelText, StringFormat='\{0\}:'}"/>
              <TextBox x:Name="PART_NumberTextBox" HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"
                        MinWidth="112"/>
                <telerik:RadButton x:Name="PART_CancelButton" Grid.Column="1" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0" MinWidth="112"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertCellsDialogStyle" TargetType="dialogs:InsertCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_Insert" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton x:Name="ShiftRightRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsRight"
                      GroupName="InsertCells"
                      Tag="ShiftRight"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_ShiftCellsDown"
                      x:Name="ShiftDownRadioButton"
                      GroupName="InsertCells"
                      IsChecked="true"
                      Tag="ShiftDown"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireRowRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireRow"
                      GroupName="InsertCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton x:Name="EntireColumnRadioButton"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertCellsDialog_EntireColumn"
                      GroupName="InsertCells"
                      Tag="EntireColumn"
                      Margin="0 2"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        HorizontalAlignment="Left"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        HorizontalAlignment="Right"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RemoveCellsDialogStyle" TargetType="dialogs:RemoveCellsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_RemoveCellsDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:RemoveCellsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Orientation="Vertical" Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_Delete" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsLeft"
                      x:Name="ShiftLeftRadioButton"
                      GroupName="RemoveCells"
                      Tag="ShiftLEft"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_ShiftCellsUp"
                      x:Name="ShiftUpRadioButton"
                      GroupName="RemoveCells"
                      IsChecked="true"
                      Tag="ShiftUp"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireRow"
                      x:Name="EntireRowRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireRow"
                      Margin="{StaticResource GeneralLabelOffset}"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_RemoveCellsDialog_EntireColumn"
                      x:Name="EntireColumnRadioButton"
                      GroupName="RemoveCells"
                      Tag="EntireColumn"
                      Margin="{StaticResource GeneralLabelOffset}"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        HorizontalAlignment="Right"
                        Grid.Column="1"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScaleFactorDialogStyle" TargetType="dialogs:ScaleFactorDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ScaleFactorDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ScaleFactorDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Magnification" Style="{StaticResource HeaderTextBlockStyle}" Margin="0"/>
              <StackPanel x:Name="PART_RadioButtonsPanel">
                <RadioButton Content="250%" GroupName="Percentage" Tag="250" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="200%" GroupName="Percentage" Tag="200" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="150%" GroupName="Percentage" Tag="150" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="100%" GroupName="Percentage" Tag="100" Margin="{StaticResource GeneralLabelOffset}"/>
                <RadioButton Content="75%" GroupName="Percentage" Tag="75" Margin="{StaticResource GeneralLabelOffset}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal">
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_ScaleFactorDialog_Custom"
                        x:Name="CustomScaleFactorRadioButton"
                        VerticalAlignment="Center"
                        GroupName="Percentage"
                        Margin="0 2"/>
                <TextBox x:Name="CustomScaleFactorTextBox" VerticalAlignment="Center" MaxLength="3" Margin="2 0" Width="55"/>
                <TextBlock VerticalAlignment="Center" Text="%"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_OKButton"
                        HorizontalAlignment="Left"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="21 0 2 0"/>
                <telerik:RadButton x:Name="PART_CancelButton" HorizontalAlignment="Right" Grid.Column="1" telerik:LocalizationManager.ResourceKey="Cancel" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionDialogContentStyle" TargetType="dialogs:InsertFunctionDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="510"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertFunctionDialog_Header"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SearchForAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal" Margin="0 3 0 5" HorizontalAlignment="Center">
                <TextBox x:Name="SearchText"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Type"
                        TextWrapping="Wrap"
                        VerticalContentAlignment="Top"
                        Width="370"
                        Height="60"/>
                <telerik:RadButton x:Name="SearchButton" Margin="10 0 0 0" MinWidth="100" VerticalAlignment="Bottom" telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Go"/>
              </StackPanel>
              <StackPanel Margin="0 5 0 10" Orientation="Horizontal">
                <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectCategory" Padding="0"/>
                <telerik:RadComboBox x:Name="SelectCategory" Width="191" Margin="5 0 0 0">
                  <telerik:RadComboBox.Items>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MostRecentlyUsed"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_All"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Financial"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_DateTime"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_MathTrig"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Statistical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_LookupReference"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Text"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Logical"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Information"/>
                    <telerik:RadComboBoxItem telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_Engineering"/>
                  </telerik:RadComboBox.Items>
                </telerik:RadComboBox>
              </StackPanel>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertFunctionDialog_SelectAFunction" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadListBox x:Name="FunctionsList" Margin="0 5" HorizontalContentAlignment="Stretch" Height="150" Padding="1"/>
              <TextBlock x:Name="FunctionSyntax" Margin="2 12 0 2" FontWeight="Bold" Text="{Binding Path=SelectedFunction.FunctionInfo.Syntax}"/>
              <TextBlock x:Name="FunctionDescription" Text="{Binding Path=SelectedFunction.FunctionInfo.Description}" TextWrapping="Wrap" Width="478"/>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FunctionArgumentsDialogContentStyle" TargetType="dialogs:FunctionArgumentsDialogContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Header" Value="{telerik:LocalizableResource Key=Spreadsheet_InsertFunctionDialog_Header}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FunctionArgumentsDialogContent">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid Visibility="{Binding DefaultModeViewVisibility}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <StackPanel Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                <TextBlock Text="{Binding FunctionName}" Visibility="{Binding ParameterizedFunctionMetadataVisibility}" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <telerik:RadListBox x:Name="PART_ArgumentsList" MaxHeight="160" Background="{TemplateBinding Background}"/>
              </StackPanel>
              <StackPanel Grid.Row="1">
                <TextBlock Text="{Binding FunctionDescription}" VerticalAlignment="Center" MaxWidth="350" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="7 4 7 0"/>
                <StackPanel Orientation="Horizontal" Margin="5" Visibility="{Binding ParameterizedFunctionMetadataVisibility}">
                  <TextBlock Text="{Binding CurrentArgumentName}"/>
                  <TextBlock Text="{Binding CurrentArgumentDescription}" MaxWidth="350" TextWrapping="Wrap" Margin="7 0 0 0"/>
                </StackPanel>
              </StackPanel>
              <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="2">
                <TextBlock Text="Formula result =" Style="{StaticResource HeaderTextBlockStyle}"/>
                <TextBlock Text="{Binding FunctionResult}" Style="{StaticResource HeaderTextBlockStyle}"/>
              </StackPanel>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Margin="{StaticResource DialogsFooterButtonMargin}" x:Name="PART_ButtonOK" VerticalAlignment="Center" MinWidth="100"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="100"/>
              </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" Visibility="{Binding SelectionModeViewVisibility}">
              <TextBox x:Name="ValueTextBox" Width="450" VerticalAlignment="Center" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
              <telerik:RadButton x:Name="ExitSelectionModeButton" VerticalAlignment="Center" Margin="5 0 0 0">
                <Image Source="{telerik:IconResource IconRelativePath=16/exitSelectionMode.png, IconSources={StaticResource IconPaths}}"/>
              </telerik:RadButton>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InsertFunctionArgumentControlStyle" TargetType="dialogs:InsertFunctionArgumentControl">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InsertFunctionArgumentControl">
          <Grid Background="{TemplateBinding Background}" Margin="5">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding ArgumentName}" VerticalAlignment="Center" Margin="5 0" Grid.Column="0"/>
            <TextBox x:Name="PART_ValueTextBox" Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="180" Grid.Column="1"/>
            <telerik:RadButton x:Name="EnterSelectionModeButton" VerticalAlignment="Center" Grid.Column="2" Margin="8 0">
              <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/enterSelectionMode.png" Stretch="None"/>
            </telerik:RadButton>
            <TextBlock Text="=" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Margin="5 0"/>
            <TextBlock Text="{Binding ArgumentStatus}" TextTrimming="WordEllipsis" Foreground="{Binding ArgumentTypeForeground}" VerticalAlignment="Center" Grid.Column="4"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StyleDialogContentStyle" TargetType="dialogs:StyleDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_StyleDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="274"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StyleDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleName" VerticalAlignment="Center"/>
                  <TextBox x:Name="StyleNameTextBox"
                          Text="{Binding Path=StyleName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          IsEnabled="{Binding Path=IsStyleNameTextBoxEnabled}"
                          Margin="5 0 0 0"
                          Width="210"/>
                </StackPanel>
                <telerik:RadButton x:Name="FormatButton"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_Format"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Margin="{StaticResource GeneralLabelOffset}"
                        MinWidth="100"/>
              </StackPanel>
              <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_StyleDialog_StyleIncludes" Margin="{StaticResource GeneralLabelOffset}"/>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Number_Header" IsChecked="{Binding Path=IncludeNumber, Mode=TwoWay}" Margin="0 2"/>
                  <TextBlock Text="{Binding Path=NumberProperties}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="1"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Alignment_Header"
                          IsChecked="{Binding Path=IncludeAlignment, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=AlignmentProperties}" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="2"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Font_Header"
                          IsChecked="{Binding Path=IncludeFont, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FontProperties}" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="3"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Border_Header"
                          IsChecked="{Binding Path=IncludeBorder, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=BorderProperties}" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="4"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Fill_Header"
                          IsChecked="{Binding Path=IncludeFill, Mode=TwoWay}"
                          Margin="{StaticResource GeneralLabelOffset}"/>
                  <TextBlock Text="{Binding Path=FillProperties}" Grid.Column="2" Grid.Row="4" VerticalAlignment="Center"/>
                  <CheckBox
                          Grid.Row="5"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatCellsDialog_Protection_Header"
                          IsChecked="{Binding Path=IncludeProtection, Mode=TwoWay}"
                          Margin="0 8"/>
                  <TextBlock Text="{Binding Path=ProtectionProperties}" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center"/>
                </Grid>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SelectColorDialogStyle" TargetType="dialogs:SelectColorDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SelectColorDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Height" Value="490"/>
    <Setter Property="Width" Value="480"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SelectColorDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
              <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Standard">
                  <spreadsheetControls:RadHexagonColorPicker
                          UseSmoothColorTransition="False"
                          SelectedColor="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Mode=TwoWay}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Margin="-75 -50 0 0"
                          Width="350"
                          Height="350"/>
                </telerik:RadTabItem>
                <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Custom">
                  <telerik:RadColorEditor x:Name="PART_ColorEditor"
                          AlphaSettingsVisibility="Collapsed"
                          ActiveSections="HueSaturationPad, LuminancePad, ColorModesPanel"
                          BorderThickness="0"
                          Background="Transparent"
                          Width="480"
                          Height="280"
                          VerticalAlignment="Top"
                          Margin="1 10 1 1"/>
                </telerik:RadTabItem>
              </telerik:RadTabControl>
              <StackPanel VerticalAlignment="Bottom" Margin="12" Grid.Row="1" HorizontalAlignment="Left">
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_New"/>
                <Border Width="50" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}">
                  <StackPanel>
                    <Rectangle Fill="{Binding ElementName=PART_ColorEditor, Path=SelectedColor, Converter={StaticResource ColorToBrushConverter}}" Height="25"/>
                    <Rectangle Height="25" Fill="White"/>
                  </StackPanel>
                </Border>
                <TextBlock HorizontalAlignment="Center" telerik:LocalizationManager.ResourceKey="Spreadsheet_SelectColorDialog_Current"/>
              </StackPanel>
              <Border
                      Grid.Row="2"
                      Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                      BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                      BorderThickness="0 1 0 0"
                      MinHeight="64">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                  <telerik:RadButton x:Name="PART_OKButton"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                  <telerik:RadButton x:Name="PART_CancelButton"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          VerticalAlignment="Center"
                          MinWidth="112"/>
                </StackPanel>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorSampleControlStyle" TargetType="dialogs:CreateNewThemeColorSampleControl">
    <Setter Property="Width" Value="100"/>
    <Setter Property="Height" Value="180"/>
    <Setter Property="Margin" Value="0 1"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorSampleControl">
          <Grid>
            <Rectangle Fill="{Binding Path=BackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Text"
                      Foreground="{Binding Path=TextColor, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontWeight="Bold"
                      FontSize="12"
                      Margin="0 12 0 0"/>
              <Grid VerticalAlignment="Top" Grid.Row="1">
                <Rectangle Width="32" Height="24" VerticalAlignment="Top" Margin="18 10 0 0">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1, 1" EndPoint="0, 1">
                      <GradientStopCollection>
                        <GradientStop Color="{Binding Path=Accent1}" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                  <Rectangle.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Rectangle.Effect>
                </Rectangle>
                <Ellipse
                        Fill="{Binding Path=CircleColor, Converter={StaticResource ColorToBrushConverter}}"
                        Height="25"
                        Width="25"
                        StrokeThickness="1"
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        Margin="-15 21 3 0">
                  <Ellipse.Effect>
                    <DropShadowEffect ShadowDepth="2" BlurRadius="1" Opacity="0.8" Color="{StaticResource ThemeControlDropShadowEffectColor}"/>
                  </Ellipse.Effect>
                </Ellipse>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeDashOffset="1"
                        StrokeThickness="1"
                        X1="0"
                        X2="8"
                        Y1="0"
                        Y2="0"
                        Width="8"
                        Height="1"
                        Margin="-24 15 0 0"/>
                <Line
                        Stroke="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}"
                        StrokeDashArray="1 1"
                        StrokeThickness="1"
                        X1="0"
                        X2="10"
                        Y1="0"
                        Y2="0"
                        Width="10"
                        Height="1"
                        Margin="-22 17 0 0"/>
              </Grid>
              <Grid Grid.Row="2" Width="72" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="1"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent1, Converter={StaticResource ColorToBrushConverter}}" Height="10" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 0 0"
                        Grid.Column="2"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent2, Converter={StaticResource ColorToBrushConverter}}" Height="20" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1 1 1 0"
                        Grid.Column="3"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent3, Converter={StaticResource ColorToBrushConverter}}" Height="30" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="4"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent4, Converter={StaticResource ColorToBrushConverter}}" Height="23" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="5"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent5, Converter={StaticResource ColorToBrushConverter}}" Height="17" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="0 1 1 0"
                        Grid.Column="6"
                        VerticalAlignment="Bottom">
                  <Rectangle Fill="{Binding Path=Accent6, Converter={StaticResource ColorToBrushConverter}}" Height="8" Width="9"/>
                </Border>
                <Border
                        BorderBrush="{Binding Path=ChartBorderColor, Converter={StaticResource ColorToBrushConverter}}"
                        BorderThickness="1"
                        Height="1"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Bottom"/>
              </Grid>
              <TextBlock
                      Grid.Row="3"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=Hyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      Margin="0 10 0 0"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
              <TextBlock
                      Grid.Row="4"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink"
                      TextDecorations="Underline"
                      Foreground="{Binding Path=FollowedHyperlink, Converter={StaticResource ColorToBrushConverter}}"
                      HorizontalAlignment="Center"
                      FontSize="12"/>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeColorsDialogContentStyle" TargetType="dialogs:CreateNewThemeColorsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeColorsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeColorsDialogContent">
          <Grid MinWidth="454" MinHeight="450" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_ThemeColors" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid Margin="0 3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark1" VerticalAlignment="Center"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark1" Grid.Column="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Text1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight1" VerticalAlignment="Center" Grid.Row="1"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light1" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" SelectedColor="{Binding Path=Background1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundDark2" VerticalAlignment="Center" Grid.Row="2"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Dark2" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" SelectedColor="{Binding Path=Text2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_TextBackGroundLight2" VerticalAlignment="Center" Grid.Row="3"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Light2" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" SelectedColor="{Binding Path=Background2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent1" VerticalAlignment="Center" Grid.Row="4"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent1" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent1, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent2" VerticalAlignment="Center" Grid.Row="5"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent2" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent2, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent3" VerticalAlignment="Center" Grid.Row="6"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent3" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent3, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent4" VerticalAlignment="Center" Grid.Row="7"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent4" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent4, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent5" VerticalAlignment="Center" Grid.Row="8"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent5" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent5, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Accent6" VerticalAlignment="Center" Grid.Row="9"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Accent6" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" SelectedColor="{Binding Path=Accent6, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Hyperlink" VerticalAlignment="Center" Grid.Row="10"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="Hyperlink" Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" SelectedColor="{Binding Path=Hyperlink, Mode=TwoWay}" Margin="5 3 0 3" Width="64"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_FollowedHyperlink" VerticalAlignment="Center" Grid.Row="11"/>
                    <spreadsheetControls:ColorSelectorDropDown x:Name="FollowedHyperlink"
                            Grid.Column="1"
                            Grid.Row="11"
                            VerticalAlignment="Center"
                            SelectedColor="{Binding Path=FollowedHyperlink, Mode=TwoWay}"
                            Margin="5 3 0 3"
                            Width="64"/>
                  </Grid>
                </StackPanel>
                <StackPanel Margin="10 5 0 5" Grid.Column="1">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Sample" FontWeight="Bold" Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="White"
                            TextColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Dark2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Right"/>
                    <dialogs:CreateNewThemeColorSampleControl
                            ChartBorderColor="Black"
                            TextColor="{Binding ElementName=Dark1, Path=SelectedColor}"
                            CircleColor="{Binding ElementName=Light1, Path=SelectedColor}"
                            BackgroundColor="{Binding ElementName=Light2, Path=SelectedColor}"
                            Accent1="{Binding ElementName=Accent1, Path=SelectedColor}"
                            Accent2="{Binding ElementName=Accent2, Path=SelectedColor}"
                            Accent3="{Binding ElementName=Accent3, Path=SelectedColor}"
                            Accent4="{Binding ElementName=Accent4, Path=SelectedColor}"
                            Accent5="{Binding ElementName=Accent5, Path=SelectedColor}"
                            Accent6="{Binding ElementName=Accent6, Path=SelectedColor}"
                            Hyperlink="{Binding ElementName=Hyperlink, Path=SelectedColor}"
                            FollowedHyperlink="{Binding ElementName=FollowedHyperlink, Path=SelectedColor}"
                            HorizontalAlignment="Left"
                            Grid.Column="1"/>
                  </Grid>
                </StackPanel>
                <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 5 0 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeColorsDialog_Name" VerticalAlignment="Center"/>
                  <TextBox
                          Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Margin="10 0 0 0"
                          HorizontalAlignment="Stretch"
                          Grid.Column="1"
                          Height="32"
                          MaxWidth="396"
                          helpers:ThemeHelper.FocusVisualMargin="0"/>
                </Grid>
              </Grid>
            </Border>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        x:Name="PART_ButtonReset"
                        Command="{Binding Path=ResetCommand}"
                        IsEnabled="{Binding Path=IsResetButtonEnabled}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="1">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Save"
                          x:Name="PART_ButtonOK"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          x:Name="PART_ButtonCancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateNewThemeFontsDialogContentStyle" TargetType="dialogs:CreateNewThemeFontsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CreateNewThemeFontsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="Height" Value="265"/>
    <Setter Property="Width" Value="500"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateNewThemeFontsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Margin="0 0 10 0">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_HeadingFont" Margin="0 0 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Major, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyFont" Margin="0 5 0 5"/>
                <telerik:RadComboBox ItemsSource="{Binding Path=Fonts}" SelectedItem="{Binding Path=Minor, Mode=TwoWay}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
              </StackPanel>
              <StackPanel Grid.Column="1">
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Sample" Margin="5 0 0 5"/>
                <RichTextBox
                        IsReadOnly="True"
                        IsHitTestVisible="False"
                        IsTabStop="False"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        ScrollViewer.VerticalScrollBarVisibility="Disabled"
                        Width="219"
                        Height="100">
                  <FlowDocument>
                    <FlowDocument.Resources>
                      <Style TargetType="{x:Type Paragraph}">
                        <Setter Property="Margin" Value="0 5"/>
                      </Style>
                    </FlowDocument.Resources>
                    <Paragraph FontFamily="{Binding Path=Major}" FontSize="22">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Heading"/>
                    </Paragraph>
                    <Paragraph FontFamily="{Binding Path=Minor}" FontSize="12">
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText1"/>
                      <LineBreak/>
                      <Run telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_BodyText2"/>
                    </Paragraph>
                  </FlowDocument>
                </RichTextBox>
              </StackPanel>
              <Grid Grid.ColumnSpan="2" Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateNewThemeFontsDialog_Name" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Path=SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0" HorizontalAlignment="Stretch" Grid.Column="1" MaxWidth="403"/>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Save"
                        x:Name="PART_ButtonOK"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatShapesDialogContentStyle" TargetType="dialogs:FormatShapesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatShapesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinWidth" Value="400"/>
    <Setter Property="MinHeight" Value="220"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatShapesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_SizeAndRotate" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonWidth, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          SmallChange="0.1"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding CommonHeight, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="0.1"
                          SmallChange="0.1"
                          CustomUnit="{Binding Path=RegionalUnitString}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Rotation" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding Rotation, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="-3600"
                          Maximum="3600"
                          CustomUnit="°"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetShapeRotationCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Scale" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="50" Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="50" Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Width" VerticalAlignment="Center"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding WidthScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleWidthCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
                <Grid Grid.Column="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Height" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                  <telerik:RadNumericUpDown
                          Grid.Column="1"
                          Value="{Binding HeightScale, Mode=TwoWay, TargetNullValue=''}"
                          Minimum="1"
                          SmallChange="1"
                          CustomUnit="%"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommand="{Binding Path=SetScaleHeightCommand}"
                          spreadsheetControls:RadNumericUpDownExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Value}"
                          Width="120"
                          Margin="3 3 0 3"/>
                </Grid>
              </Grid>
              <CheckBox
                      Command="{Binding Path=ChangeLockAspectRatioCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_LockAspectRatio"
                      IsChecked="{Binding InitialLockAspectRatio, Mode=OneTime}"
                      Margin="5 10 5 5"/>
              <CheckBox
                      Command="{Binding Path=ChangeRelativeToOriginalResizeCommand}"
                      CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_Relative"
                      IsChecked="{Binding InitialRelativeToOriginalResize, Mode=OneTime}"
                      IsEnabled="{Binding RelativeToOriginalResizeIsEnabled, Mode=OneTime}"
                      Margin="5 0 5 5"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalSize" Margin="0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalWidth" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalWidth, Mode=OneTime}" Margin="0 2 5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" telerik:LocalizationManager.ResourceKey="Spreadsheet_FormatShapesDialog_OriginalHeight" Margin="5 2"/>
                <TextBlock Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}" Text="{Binding OriginalHeight, Mode=OneTime}" Margin="0 2 5 2"/>
              </StackPanel>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Reset"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Visibility="{Binding Path=SelectionHasImages, Converter={StaticResource BoolToVisibilityValueConverter}}"
                        Command="{Binding Path=ResetCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Command="{Binding Path=CloseCommand}" telerik:LocalizationManager.ResourceKey="Close" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SeriesDialogContentStyle" TargetType="dialogs:SeriesDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SeriesDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="MinHeight" Value="210"/>
    <Setter Property="MinWidth" Value="270"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SeriesDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_SeriesIn" HorizontalAlignment="Left">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Rows"
                            GroupName="1"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Horizontal, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Columns"
                            GroupName="2"
                            IsChecked="{Binding Path=SeriesOrientation, Converter={StaticResource SeriesOrientationToBooleanConverter}, ConverterParameter=Vertical, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Type" Margin="5 0" HorizontalAlignment="Center" Grid.Column="1">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Linear"
                            GroupName="3"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Linear, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Growth"
                            GroupName="4"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Growth, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Date"
                            GroupName="5"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=Date, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_AutoFill"
                            GroupName="6"
                            IsEnabled="{Binding Path=IsTrend, Converter={StaticResource BooleanToInversedBooleanConverter}}"
                            IsChecked="{Binding Path=Type, Converter={StaticResource SeriesTypeToBooleanConverter}, ConverterParameter=AutoFill, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
                <telerik:GroupBox
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_DateUnit"
                        IsEnabled="{Binding Path=IsDateUnitEnabled}"
                        Margin="0"
                        HorizontalAlignment="Right">
                  <StackPanel>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Day"
                            GroupName="7"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Day, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Weekday"
                            GroupName="8"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Weekday, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Month"
                            GroupName="9"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Month, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                    <RadioButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Year"
                            GroupName="10"
                            IsChecked="{Binding Path=DateUnit, Converter={StaticResource SeriesDateUnitToBooleanConverter}, ConverterParameter=Year, Mode=TwoWay}"
                            Margin="{StaticResource GeneralLabelOffset}"/>
                  </StackPanel>
                </telerik:GroupBox>
              </Grid>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_Trend" IsChecked="{Binding Path=IsTrend, Mode=TwoWay}" Margin="2 7 0 7" Grid.Row="1"/>
              <Grid Grid.Row="2" Margin="2 0 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StepValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StepValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SeriesDialog_StopValue" Margin="0 0 5 0" VerticalAlignment="Center"/>
                  <TextBox Text="{Binding Path=StopValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Path=IsTextBoxesEnabled}" Width="54"/>
                </StackPanel>
              </Grid>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center" HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_ButtonOK"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        MinWidth="{StaticResource ScheduleViewDialogButtonMinWidth}"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkDialogContentStyle" TargetType="dialogs:HyperlinkDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_InsertHyperlinkDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_LinkTo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
              <Border Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}" Margin="0 0 5 1">
                <StackPanel>
                  <telerik:RadRadioButton x:Name="PART_WebPageButton" Width="80" Padding="5" MinHeight="70" Margin="10 5" UseLayoutRounding="True" IsBackgroundVisible="False">
                    <StackPanel>
                      <telerik:RadGlyph
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              Glyph="{StaticResource GlyphHyperlink}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_WebPage"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_InDocumentButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphIndentIncrease}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_PlaceInDocument"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                  <telerik:RadRadioButton x:Name="PART_EmailButton"
                          Width="80"
                          Padding="5"
                          MinHeight="70"
                          Margin="10 5"
                          UseLayoutRounding="True"
                          IsBackgroundVisible="False"
                          FontSize="{telerik:Windows11Resource ResourceKey=FontSize}">
                    <StackPanel>
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphEmail}"/>
                      <TextBlock
                              telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddress"
                              Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                              TextWrapping="Wrap"
                              HorizontalAlignment="Center"/>
                    </StackPanel>
                  </telerik:RadRadioButton>
                </StackPanel>
              </Border>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TextToDisplay"
                      Grid.Column="1"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="TextToDisplay" Grid.Column="2" Margin="3" Width="350" Text="{Binding TextToDisplay, Mode=TwoWay}" MaxLength="255" IsEnabled="{Binding ShouldApplyCellValue}"/>
              <TextBlock
                      Grid.Row="1"
                      Grid.Column="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_ScreenTip"
                      VerticalAlignment="Top"
                      HorizontalAlignment="Left"
                      Margin="2 5"/>
              <TextBox x:Name="ScreenTip" Grid.Row="1" Grid.Column="2" Margin="3" Width="350" VerticalAlignment="Center" Text="{Binding ScreenTip, Mode=TwoWay}" MaxLength="255"/>
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0 2 0 0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkWebPageCategoryContentStyle" TargetType="dialogs:HyperlinkWebPageCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkWebPageCategoryContent">
          <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Address" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="Address" Grid.Row="1" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedWebPages" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" Grid.Row="2" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" ItemsSource="{Binding UsedWebPages}" Margin="2 1" Width="445" Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkInDocumentCategoryContentStyle" TargetType="dialogs:HyperlinkInDocumentCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkInDocumentCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450" HorizontalAlignment="Left">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_TypeTheCellReference" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="CellReference" Grid.Row="1" Text="{Binding CellReference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedCellReferences" Grid.Row="1" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress"
                    Grid.Row="2"
                    SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
                    ItemsSource="{Binding UsedCellReferences}"
                    Margin="2 1"
                    Width="445"
                    Height="150"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HyperlinkEmailCategoryContentStyle" TargetType="dialogs:HyperlinkEmailCategoryContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HyperlinkEmailCategoryContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_EMailAddressColumn" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailAddress" Grid.Row="1" Text="{Binding EmailAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Width="450">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_Subject" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2 1"/>
              <TextBox x:Name="EmailSubject" Grid.Row="1" Text="{Binding EmailSubject, Mode=TwoWay}" MaxLength="255" Margin="2 1"/>
            </StackPanel>
            <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_InsertHyperlinkDialog_RecentlyUsedEMailAddresses" Grid.Row="2" Grid.ColumnSpan="2" Margin="2 1"/>
            <telerik:RadListBox x:Name="SelectedAddress" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" Grid.Row="3" ItemsSource="{Binding UsedEmails}" Height="102" Margin="2 1" Width="445"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FindAndReplaceDialogContentStyle" TargetType="dialogs:FindAndReplaceDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FindAndReplaceDialog_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="HostWindowMinWidth" Value="500"/>
    <Setter Property="MaxHeight" Value="600"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="HostWindowMinHeight" Value="350"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FindAndReplaceDialogContent">
          <Grid x:Name="Container" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition MinHeight="138" Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Background="{TemplateBinding Background}" Grid.RowSpan="4"/>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Find"/>
              <telerik:RadTabItem x:Name="ReplaceTabItem" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"/>
            </telerik:RadTabControl>
            <Grid Grid.Row="1" Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindWhat" Padding="0"/>
              <TextBox x:Name="FindWhat" Grid.Column="1" MinWidth="335" Margin="5" Text="{Binding Path=SearchedWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
              <telerik:Label
                      Grid.Row="1"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceWith"
                      Margin="0 5"
                      Padding="0"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <TextBox
                      Grid.Row="1"
                      Grid.Column="1"
                      MinWidth="335"
                      VerticalAlignment="Center"
                      Text="{Binding Path=ReplaceWithWord, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                      Margin="5"
                      Visibility="{Binding ElementName=ReplaceTabItem,Path=IsSelected,Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
              <Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0 2 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="OptionsContainer">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Within" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=WithinValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchWithinValue, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Search" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=SearchBy, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=SearchByType, Mode=TwoWay}"/>
                  <telerik:Label Grid.Row="2" telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_LookIn" Padding="0"/>
                  <telerik:RadComboBox
                          Grid.Row="2"
                          Grid.Column="1"
                          Margin="0 3"
                          ItemsSource="{Binding Path=LookInValues, Mode=OneWay}"
                          DisplayMemberPath="Name"
                          SelectedValuePath="SearchLocation"
                          SelectedValue="{Binding Path=LookIn, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.RowSpan="3">
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchCase" Margin="5 3" IsChecked="{Binding Path=MatchCase, Mode=TwoWay}"/>
                    <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_MatchEntireContent" Margin="5 3" IsChecked="{Binding Path=MatchEntireCellContents, Mode=TwoWay}"/>
                  </StackPanel>
                </Grid>
              </Grid>
            </Grid>
            <Border Grid.Row="2" HorizontalAlignment="Stretch">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ReplaceTabItem, Path=IsSelected, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_ReplaceAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Replace"
                          Margin="0 0 5 0"
                          Command="{Binding Path=ReplaceCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="7 0 0 0">
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindAll"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindAllCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                  <telerik:RadButton
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_FindNext"
                          Margin="0 0 5 0"
                          Command="{Binding Path=FindNextCommand}"
                          VerticalAlignment="Center"
                          MinWidth="100"/>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="5 0 0 0">
                  <telerik:RadButton telerik:LocalizationManager.ResourceKey="Close" Command="{Binding Path=CloseDialogCommand}" VerticalAlignment="Center" MinWidth="100"/>
                </StackPanel>
              </Grid>
            </Border>
            <StackPanel Grid.Row="3" Visibility="{Binding ResultsGridVisibility}" Margin="{StaticResource DialogsInnerContentMargin}">
              <grid:RadGridView x:Name="ResultsGridView"
                      ItemsSource="{Binding Path=FindAllResults}"
                      RowIndicatorVisibility="Collapsed"
                      IsReadOnly="True"
                      AutoGenerateColumns="False"
                      CanUserFreezeColumns="False"
                      ShowGroupPanel="False"
                      VerticalAlignment="Top"
                      MaxWidth="548"
                      MaxHeight="277"
                      Margin="1"
                      BorderThickness="1">
                <grid:RadGridView.Columns>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_SheetColumn"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.Worksheet.Name}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Cell"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=FoundCell.CellIndex, Converter={StaticResource CellIndexToNameConverter}}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Value"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=ResultValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                  <grid:GridViewColumn MinWidth="75">
                    <grid:GridViewColumn.Header>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_FindAndReplaceDialog_Formula"/>
                    </grid:GridViewColumn.Header>
                    <grid:GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <Button
                                Content="{Binding Path=RawValue}"
                                Command="{Binding RelativeSource={RelativeSource AncestorType=grid:RadGridView} , Path=DataContext.GoToCellCommand}"
                                CommandParameter="{Binding Path=FoundCell}"
                                Style="{StaticResource LinkButtonStyle}"/>
                      </DataTemplate>
                    </grid:GridViewColumn.CellTemplate>
                  </grid:GridViewColumn>
                </grid:RadGridView.Columns>
              </grid:RadGridView>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="NameManagerDialogContentStyle" TargetType="dialogs:NameManagerDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_NameManagerDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="545"/>
    <Setter Property="Height" Value="405"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:NameManagerDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
            <StackPanel Orientation="Horizontal" Margin="{StaticResource DialogsInnerContentMargin}">
              <telerik:RadButton x:Name="New"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_New"
                      Command="{Binding Path=CreateDefinedName}"
                      Margin="0 0 8 0"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Edit"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Edit"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=UpdateSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
              <telerik:RadButton x:Name="Delete"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_NameManagerDialog_Delete"
                      Margin="0 0 8 0"
                      IsEnabled="{Binding Path=IsSpreadsheetNameSelected}"
                      Command="{Binding Path=DeleteSpreadsheetName}"
                      CommandParameter="{Binding Path=SelectedSpreadsheetNameView}"
                      VerticalAlignment="Center"
                      MinWidth="100"/>
            </StackPanel>
            <grid:RadGridView x:Name="SpreadsheetNamesGridView"
                    Grid.Row="1"
                    ItemsSource="{Binding Path=SpreadsheetNameViews}"
                    SelectedItem="{Binding Path=SelectedSpreadsheetNameView, Mode=TwoWay}"
                    RowIndicatorVisibility="Collapsed"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    CanUserSortColumns="False"
                    CanUserFreezeColumns="False"
                    ShowGroupPanel="False"
                    SelectionUnit="FullRow"
                    VerticalAlignment="Top"
                    Height="285"
                    FocusVisualStyle="{x:Null}"
                    Margin="10 0 10 10">
              <grid:RadGridView.Columns>
                <grid:GridViewColumn Width="*" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Name}">
                  <grid:GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Image Source="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/16/defineName.png" Width="16"/>
                        <TextBlock Text="{Binding Path=Name}" Margin="5 0 0 0"/>
                      </StackPanel>
                    </DataTemplate>
                  </grid:GridViewColumn.CellTemplate>
                </grid:GridViewColumn>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Value}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Value}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding RefersTo}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_RefersTo}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding ScopeName}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Scope}"/>
                <grid:GridViewDataColumn Width="*" DataMemberBinding="{Binding Comment}" Header="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=Spreadsheet_NameManagerDialog_Comment}"/>
              </grid:RadGridView.Columns>
            </grid:RadGridView>
            <Border
                    VerticalAlignment="Stretch"
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    Padding="{StaticResource DialogsFooterMargin}">
              <telerik:RadButton x:Name="Close"
                      Command="{Binding Path=CloseCommand}"
                      telerik:LocalizationManager.ResourceKey="Close"
                      HorizontalAlignment="Right"
                      VerticalAlignment="Center"
                      MinWidth="112"
                      Margin="{StaticResource DialogsFooterButtonMargin}"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DataValidationDialogContentStyle" TargetType="dialogs:DataValidationDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="AutomationProperties.AutomationId" Value="dataValidationDialog"/>
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_DataValidationDialog_Header"/>
    <Setter Property="Width" Value="460"/>
    <Setter Property="Height" Value="500"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:DataValidationDialogContent">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl SelectedIndex="{Binding Path=SelectedTabIndex, Mode=TwoWay}" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Settings" AutomationProperties.AutomationId="settings">
                <Grid Margin="{TemplateBinding Padding}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <Grid>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ValidationCriteria"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Grid.Row="1" Margin="5 5 5 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Allow" Margin="{StaticResource GeneralLabelOffset}"/>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5 0 0 0">
                        <CheckBox
                                AutomationProperties.AutomationId="ignoreBlank"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=IgnoreBlank, Mode=TwoWay}"
                                IsEnabled="{Binding Path=IgnoreBlankIsEnabled}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_IgnoreBlank"/>
                        <CheckBox
                                AutomationProperties.AutomationId="inCellDropDown"
                                HorizontalAlignment="Left"
                                IsChecked="{Binding Path=InCellDropdown, Mode=TwoWay}"
                                Visibility="{Binding Path=InCellDropdownVisibility}"
                                telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InCellDropDown"/>
                      </StackPanel>
                      <StackPanel>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="validationRuleTypes"
                                Width="150"
                                HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=ValidationRuleTypes}"
                                SelectedIndex="{Binding Path=SelectedValidationRuleIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Data" Margin="{StaticResource GeneralLabelOffset}"/>
                        <telerik:RadComboBox
                                AutomationProperties.AutomationId="comparisonOperators"
                                IsEnabled="{Binding Path=IsComparisonOperatorsEnabled, Mode=TwoWay}"
                                HorizontalAlignment="Left"
                                Width="150"
                                ItemsSource="{Binding Path=ComparisonOperators}"
                                SelectedIndex="{Binding Path=SelectedComparisonOperatorIndex, Mode=TwoWay}"
                                Margin="0 0 3 3"/>
                      </StackPanel>
                    </Grid>
                    <TextBlock Text="{Binding Path=ArgumentHeader1, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility1}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility1}"
                            Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                    <TextBlock Text="{Binding Path=ArgumentHeader2, Mode=TwoWay}" Visibility="{Binding Path=ArgumentVisibility2}" Margin="0 0 2 0"/>
                    <TextBox
                            AutomationProperties.AutomationId="Argument1"
                            HorizontalAlignment="Left"
                            HorizontalContentAlignment="Stretch"
                            Width="260"
                            Visibility="{Binding Path=ArgumentVisibility2}"
                            Text="{Binding Path=Argument2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="0 0 3 3"/>
                  </StackPanel>
                  <CheckBox
                          AutomationProperties.AutomationId="applyChangesToAllCellsWithTheSameSettings"
                          Grid.Row="3"
                          IsChecked="{Binding Path=ApplyChangesToAllCellsWithTheSameSettings, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ApplyChangesToAllCellsWithTheSameSettings"
                          Margin="0 9 0 0"/>
                </Grid>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessage" AutomationProperties.AutomationId="inputMessage">
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          AutomationProperties.AutomationId="showInputMessageWhenCellIsSelected"
                          IsChecked="{Binding Path=ShowInputMessageWhenCellIsSelected, Mode=TwoWay}"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowInputMessageWhenCellIsSelected"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenCellIsSelectedShowInputMessage"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <StackPanel Margin="10 5 10 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageTitle"
                            MaxLength="32"
                            HorizontalContentAlignment="Stretch"
                            Margin="0 0 0 3"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_InputMessageLabel" Margin="{StaticResource GeneralLabelOffset}"/>
                    <TextBox
                            Text="{Binding Path=InputMessageContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            IsEnabled="{Binding Path=ShowInputMessageWhenCellIsSelected}"
                            AutomationProperties.AutomationId="inputMessageContent"
                            VerticalScrollBarVisibility="Visible"
                            MaxLength="255"
                            TextWrapping="Wrap"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Top"
                            Height="100"/>
                  </StackPanel>
                </StackPanel>
              </telerik:RadTabItem>
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorAlert" AutomationProperties.AutomationId="errorAlert">
                <telerik:RadTabItem.Resources>
                  <telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Light/" DarkBasePath="/Telerik.Windows.Controls.Spreadsheet;component/Images/Dark/"/>
                </telerik:RadTabItem.Resources>
                <StackPanel Margin="{TemplateBinding Padding}">
                  <CheckBox
                          IsChecked="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered, Mode=TwoWay}"
                          AutomationProperties.AutomationId="showErrorAlertAfterInvalidDataIsEntered"
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ShowErrorAlertAfterInvalidDataIsEntered"
                          Margin="0"/>
                  <Grid Margin="0 10 0 0">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_WhenUserEntersInvalidDataShowThisErrorAlert"/>
                    <Border Grid.Column="1" Height="1" Margin="4 2 0 0" Background="Transparent"/>
                  </Grid>
                  <Grid Margin="10 5 10 0">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"/>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="10"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Style" Margin="{StaticResource GeneralLabelOffset}"/>
                      <telerik:RadComboBox
                              AutomationProperties.AutomationId="errorAlertStyles"
                              ItemsSource="{Binding Path=ErrorAlertStyles}"
                              SelectedIndex="{Binding Path=SelectedErrorStyleIndex, Mode=TwoWay}"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=StopImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=WarningImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <Image
                            Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"
                            Visibility="{Binding Path=InformationImageVisibility}"
                            Grid.Row="1"
                            Grid.Column="0"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Stretch="None"/>
                    <StackPanel Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_Title" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertTitle"
                              MaxLength="32"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"
                              Margin="0 0 0 3"/>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="2">
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_DataValidationDialog_ErrorMessage" Margin="{StaticResource GeneralLabelOffset}"/>
                      <TextBox
                              Text="{Binding Path=ErrorAlertContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                              AutomationProperties.AutomationId="errorAlertContent"
                              VerticalScrollBarVisibility="Visible"
                              TextWrapping="Wrap"
                              MaxLength="235"
                              Height="100"
                              VerticalContentAlignment="Top"
                              HorizontalContentAlignment="Stretch"
                              IsEnabled="{Binding Path=ShowErrorAlertAfterInvalidDataIsEntered}"/>
                    </StackPanel>
                  </Grid>
                </StackPanel>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="PART_ButtonClearAll"
                        Command="{Binding Path=ClearAllCommand}"
                        Grid.Column="0"
                        telerik:LocalizationManager.ResourceKey="ClearAll"
                        VerticalAlignment="Center"
                        MinWidth="112"/>
                <StackPanel Orientation="Horizontal" Grid.Column="2">
                  <telerik:RadButton x:Name="PART_ButtonOK"
                          BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                          Command="{Binding Path=OkCommand}"
                          telerik:LocalizationManager.ResourceKey="Ok"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                  <telerik:RadButton x:Name="PART_ButtonCancel"
                          Command="{Binding Path=CloseCommand}"
                          telerik:LocalizationManager.ResourceKey="Cancel"
                          VerticalAlignment="Center"
                          MinWidth="112"
                          Margin="{StaticResource DialogsFooterButtonMargin}"/>
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="FormatTemplate">
    <Grid>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Preview:" FontWeight="Bold"/>
        <Border BorderThickness="1" BorderBrush="Black" Grid.Column="1" Background="White" VerticalAlignment="Center" Margin="10 0">
          <Image VerticalAlignment="Center" Height="36" Width="460" Source="{Binding FormatSource}" Margin="2"/>
        </Border>
        <telerik:RadButton VerticalAlignment="Center" Content="Format..." Grid.Column="2" Command="{Binding ShowFormattingDialogCommand}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleTwoTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Grid.Column="0" Margin="0 0 5 0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Grid.Column="1" Margin="0 5 5 5" Grid.ColumnSpan="2" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ColorScaleThreeTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Midpoint" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="3"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMidpointValueType}"
              ItemsSource="{Binding MidpointValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="3"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox Margin="0 3 5 0" Grid.Column="2" Grid.Row="2" Text="{Binding MidStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="3"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color:" Grid.Column="0" Grid.Row="3"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="3" SelectedColor="{Binding MinimumColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="2" Grid.Row="3" SelectedColor="{Binding MidpointColor, Mode=TwoWay}"/>
      <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="3" Grid.Row="3" SelectedColor="{Binding MaximumColor, Mode=TwoWay}"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Grid.Column="0" Grid.Row="4" Text="Preview:" FontWeight="Bold"/>
      <Rectangle Margin="0 5 5 5" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Fill="{Binding CurrentGradient}" Stroke="Black" Height="20"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DataBarTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="56"/>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Minimum" Grid.Column="1"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Maximum" Grid.Column="2"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Type:" Grid.Column="0" Grid.Row="1"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="1"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMinimumValueType}"
              ItemsSource="{Binding MinimumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <telerik:RadComboBox
              Margin="0 3 5 0"
              Grid.Column="2"
              Grid.Row="1"
              SelectedValue="{Binding SelectedMaximumValueType}"
              ItemsSource="{Binding MaximumValueTypes}"
              SelectedValuePath="Value"
              DisplayMemberPath="DisplayName"
              helpers:ThemeHelper.FocusVisualMargin="0"/>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Value:" Grid.Column="0" Grid.Row="2"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MinWatermark}"
              IsReadOnly="{Binding EnableMinValue}"
              Grid.Column="1"
              Grid.Row="2"
              Text="{Binding MinStringValue, Mode=TwoWay}"/>
      <telerik:RadWatermarkTextBox
              Margin="0 3 5 0"
              WatermarkContent="{Binding MaxWatermark}"
              IsReadOnly="{Binding EnableMaxValue}"
              Grid.Column="2"
              Grid.Row="2"
              Text="{Binding MaxStringValue, Mode=TwoWay}"/>
      <Grid Grid.Row="3" Grid.ColumnSpan="3">
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="2*"/>
          <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Bar Appearence:" FontWeight="Bold"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Fill" Grid.Column="0" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="1" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Border" Grid.Column="3" Grid.Row="1"/>
        <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Color" Grid.Column="4" Grid.Row="1"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="0"
                Grid.Row="2"
                SelectedValue="{Binding SelectedFillType}"
                ItemsSource="{Binding FillTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding FillColor, Mode=TwoWay}"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Column="3"
                Grid.Row="2"
                SelectedValue="{Binding SelectedBorderType}"
                ItemsSource="{Binding BorderTypes}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
        <spreadsheetControls:ColorSelectorDropDown Margin="0 3 5 0" Grid.Column="4" Grid.Row="2" HorizontalAlignment="Left" SelectedColor="{Binding BorderColor, Mode=TwoWay}"/>
        <Button Margin="0 3 5 0" Content="Negative Value and Axis..." Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Left" Command="{Binding ShowDataBarDialogCommand}"/>
        <TextBlock Margin="0 3 5 0" Text="Bar Direction:" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3"/>
        <telerik:RadComboBox
                Margin="0 3 5 0"
                Grid.Row="3"
                Grid.Column="4"
                SelectedValue="{Binding SelectedDirection}"
                ItemsSource="{Binding Directions}"
                SelectedValuePath="Value"
                DisplayMemberPath="DisplayName"/>
      </Grid>
      <TextBlock VerticalAlignment="Center" Margin="0 0 5 0" Text="Preview:" FontWeight="Bold" Grid.Row="4"/>
      <Border Height="22" Margin="0 3 5 0" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black" Padding="2">
        <Image Source="{Binding DataBarPreview}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="546" Height="16"/>
      </Border>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="IconSetTemplate">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <StackPanel Orientation="Horizontal" Grid.Row="0">
        <TextBlock Text="Icon Style:" Width="100" VerticalAlignment="Center" Margin="0 0 5 0"/>
        <telerik:RadComboBox
                Width="150"
                SelectedValue="{Binding SelectedIconSet}"
                ItemsSource="{Binding IconPresets}"
                SelectedValuePath="Preset"
                VerticalAlignment="Center"
                Margin="0 0 5 0"
                helpers:ThemeHelper.FocusVisualMargin="0">
          <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
              <Image Source="{Binding Icons}" Height="25" Width="110" Margin="0 0 5 0"/>
            </DataTemplate>
          </telerik:RadComboBox.ItemTemplate>
        </telerik:RadComboBox>
        <Button Content="Reverse Icon Order" Width="150" Command="{Binding ReverseIconSet}" VerticalAlignment="Center" Margin="0 0 5 0" Height="25"/>
        <CheckBox Content="Show Icon Only" Width="150" IsChecked="{Binding ShowIconsOnly}" VerticalAlignment="Center" Margin="0 0 5 0"/>
      </StackPanel>
      <TextBlock Grid.Row="1" Text="Display each icon according to these rules:" VerticalAlignment="Center"/>
      <Grid Height="25" Grid.Row="2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="285"/>
          <ColumnDefinition/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Icon" FontWeight="Black" Grid.Column="0"/>
        <TextBlock Text="Value" FontWeight="Black" Grid.Column="1"/>
        <TextBlock Text="Type" FontWeight="Black" Grid.Column="2"/>
      </Grid>
      <ItemsControl ItemsSource="{Binding Items}" Grid.Row="3">
        <ItemsControl.ItemTemplate>
          <DataTemplate>
            <Grid Height="25">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
              </Grid.ColumnDefinitions>
              <Border Grid.Column="0" Margin="0 3 5 0">
                <Image Source="{Binding IconImage}"/>
              </Border>
              <TextBlock Margin="0 3 5 0" Text="{Binding Text}" Grid.Column="1"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="2"
                      SelectedValue="{Binding SelectedComparisonOperator}"
                      ItemsSource="{Binding ComparisonOperators}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
              <TextBox Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Margin="0 3 5 0" Grid.Column="3" Text="{Binding Argument}"/>
              <telerik:RadComboBox
                      Visibility="{Binding IsLast, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                      Margin="0 3 5 0"
                      Grid.Column="4"
                      SelectedValue="{Binding SelectedRangeValue}"
                      ItemsSource="{Binding RangeValues}"
                      SelectedValuePath="Value"
                      DisplayMemberPath="DisplayName"/>
            </Grid>
          </DataTemplate>
        </ItemsControl.ItemTemplate>
      </ItemsControl>
    </Grid>
  </DataTemplate>
  <Style TargetType="{x:Type dialogs:DataBarDialogContent}" x:Key="DataBarDialogContentStyle">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:DataBarDialogContent}">
          <Grid Width="400" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar fill color" Grid.Column="0"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Fill color:" GroupName="negFill" x:Name="NegFillButton" IsChecked="{Binding UseNegativeFill}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegFillButton, Path=IsChecked}" SelectedColor="{Binding NegativeFillColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same fill color as positive bar" GroupName="negFill" IsChecked="{Binding UsePositiveFill}"/>
            </StackPanel>
            <StackPanel Grid.Row="1">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Negative bar border color"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <StackPanel Orientation="Horizontal">
                <RadioButton Content="Border color:" GroupName="negBorder" x:Name="NegBorderButton" IsChecked="{Binding UseNegativeBorder}"/>
                <telerik:RadColorPicker IsEnabled="{Binding ElementName=NegBorderButton, Path=IsChecked}" SelectedColor="{Binding NegativeBorderColor}"/>
              </StackPanel>
              <RadioButton Content="Apply same border color as positive bar" GroupName="negBorder" IsChecked="{Binding UsePositiveBorder}"/>
            </StackPanel>
            <StackPanel Grid.Row="2">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Axis settings"/>
                <Border Height="1" BorderThickness="1" BorderBrush="Gray" Grid.Column="1"/>
              </Grid>
              <TextBlock Text="Select axis position in cell to change the appearence of bars for negative values"/>
              <RadioButton Content="Automatic (display at variable position based on negative values)" GroupName="axis" IsChecked="{Binding AutomaticAxis}"/>
              <RadioButton Content="Cell midpoint" GroupName="axis" IsChecked="{Binding MidpointAxis}"/>
              <RadioButton Content="None (show negative value bars in same direction as positive)" GroupName="axis" IsChecked="{Binding NoAxis}"/>
              <StackPanel Orientation="Horizontal">
                <TextBlock Text="Axis color:"/>
                <telerik:RadColorPicker SelectedColor="{Binding AxisColor}" IsEnabled="{Binding HasAxis}"/>
              </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
              <telerik:RadButton x:Name="PART_ButtonOK" Content="Ok" Width="70" Margin="1 1 10 1"/>
              <telerik:RadButton x:Name="PART_ButtonCancel" Content="Cancel" Width="70" Margin="1 1 10 1"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ValueView}" x:Key="ValueViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ValueView}">
          <StackPanel>
            <TextBlock Text="Format all cells based on their values" FontWeight="Bold" Margin="0 3 5 5" VerticalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0 10">
              <TextBlock Text="Format Style:" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      SelectedValue="{Binding SelectedFormatStyle}"
                      ItemsSource="{Binding FormatStyleSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"
                      Margin="0 3 5 0"
                      VerticalAlignment="Center"
                      Width="120"/>
            </StackPanel>
            <ContentControl Content="{Binding SelectedFormatViewModel}">
              <ContentControl.ContentTemplateSelector>
                <dialogs:ValueFormattingTemplateSelector
                        ColorScaleTwoTemplate="{StaticResource ColorScaleTwoTemplate}"
                        ColorScaleThreeTemplate="{StaticResource ColorScaleThreeTemplate}"
                        DataBarTemplate="{StaticResource DataBarTemplate }"
                        IconSetTemplate="{StaticResource IconSetTemplate }"/>
              </ContentControl.ContentTemplateSelector>
            </ContentControl>
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:ContainView}" x:Key="ContainViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:ContainView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
              </Grid.RowDefinitions>
              <TextBlock Text="Format only cells with:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <Grid Grid.Row="1" Margin="0 5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadComboBox
                        VerticalAlignment="Center"
                        Margin="0 3 5 0"
                        SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:ContainsViewDataTemplateSelector>
                      <dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Margin="0 3 5 0"
                                    VerticalAlignment="Center"
                                    SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}"
                                    ItemsSource="{Binding RuleTypes}"
                                    DisplayMemberPath="DisplayName"
                                    SelectedValuePath="Value"
                                    Width="120"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <ContentControl Grid.Column="1" Content="{Binding SelectedFormatViewModel}">
                              <ContentControl.ContentTemplateSelector>
                                <dialogs:CellValueDataTemplateSelector>
                                  <dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <TextBox Text="{Binding Argument}" Margin="0 3 5 0" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.SingleArgumentTemplate>
                                  <dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                    <DataTemplate>
                                      <Grid>
                                        <Grid.ColumnDefinitions>
                                          <ColumnDefinition/>
                                          <ColumnDefinition Width="Auto"/>
                                          <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Text="{Binding Argument1}" Margin="0 3 5 0" Grid.Column="0" VerticalAlignment="Center"/>
                                        <TextBlock Text="and" Margin="0 3 5 0" Grid.Column="1" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Argument2}" Margin="0 3 5 0" Grid.Column="2" VerticalAlignment="Center"/>
                                      </Grid>
                                    </DataTemplate>
                                  </dialogs:CellValueDataTemplateSelector.DualArgumentTemplate>
                                </dialogs:CellValueDataTemplateSelector>
                              </ContentControl.ContentTemplateSelector>
                            </ContentControl>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.CellValueTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                        <DataTemplate>
                          <telerik:RadComboBox
                                  HorizontalAlignment="Left"
                                  Width="120"
                                  VerticalAlignment="Center"
                                  Margin="0 3 5 0"
                                  SelectedValue="{Binding SelectedPeriod}"
                                  ItemsSource="{Binding Periods}"
                                  SelectedValuePath="Value"
                                  DisplayMemberPath="DisplayName"
                                  helpers:ThemeHelper.FocusVisualMargin="0"/>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.DateTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                        <DataTemplate/>
                      </dialogs:ContainsViewDataTemplateSelector.BlankTemplate>
                      <dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                        <DataTemplate>
                          <Grid>
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox
                                    Width="120"
                                    VerticalAlignment="Center"
                                    Margin="0 3 5 0"
                                    SelectedValue="{Binding SelectedOperator}"
                                    ItemsSource="{Binding Operators}"
                                    SelectedValuePath="Value"
                                    DisplayMemberPath="DisplayName"
                                    helpers:ThemeHelper.FocusVisualMargin="0"/>
                            <TextBox Margin="0 3 5 0" Text="{Binding Text, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"/>
                          </Grid>
                        </DataTemplate>
                      </dialogs:ContainsViewDataTemplateSelector.TextTemplate>
                    </dialogs:ContainsViewDataTemplateSelector>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </Grid>
            </Grid>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:FormulaView}" x:Key="FormulaViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:FormulaView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Grid.Row="0" Text="Format cell values where this formula is true:" FontWeight="Bold" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <TextBox Grid.Row="1" Text="{Binding Formula}" HorizontalAlignment="Stretch" Margin="0 3 5 0" VerticalAlignment="Center"/>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="0 10"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:TopBottomView}" x:Key="TopBottomViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:TopBottomView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0" VerticalAlignment="Center"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBox Text="{Binding InputValue, Mode=TwoWay}" Width="100" Margin="0 3 5 0" VerticalAlignment="Center"/>
                <CheckBox IsChecked="{Binding IsPercent, Mode=TwoWay}" Margin="0 5 5 0" VerticalAlignment="Center" Content="% of selected range"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:AverageView}" x:Key="AverageViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:AverageView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"
                        helpers:ThemeHelper.FocusVisualMargin="0"/>
                <TextBlock Text="the average for the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type dialogs:OccurrenceView}" x:Key="OccurrenceViewStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type dialogs:OccurrenceView}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <TextBlock Text="Format values that rank in the:" FontWeight="Bold" Grid.Row="0" Margin="0 3 5 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 5">
                <telerik:RadComboBox
                        SelectedValue="{Binding SelectedRuleType}"
                        ItemsSource="{Binding RuleTypes}"
                        DisplayMemberPath="DisplayName"
                        SelectedValuePath="Value"
                        Width="120"
                        Margin="0 3 5 0"
                        VerticalAlignment="Center"/>
                <TextBlock Text="values in the selected range" Margin="0 3 5 0" VerticalAlignment="Center"/>
              </StackPanel>
            </StackPanel>
            <ContentControl Content="{Binding Format}" ContentTemplate="{StaticResource FormatTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ConditionalFormattingContentStyle" TargetType="dialogs:ConditionalFormattingDialogContent">
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="700"/>
    <Setter Property="MinHeight" Value="520"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="{StaticResource DialogsInnerContentMargin}">
              <TextBlock Text="Select rule type:" Margin="0 0 0 8"/>
              <ListBox ItemsSource="{Binding RuleTypes}" SelectedValuePath="Value" SelectedValue="{Binding SelectedRuleType, Mode=TwoWay}">
                <ListBox.ItemTemplate>
                  <DataTemplate>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                      </Grid.ColumnDefinitions>
                      <Rectangle Width="10" Height="10" Fill="Red" Margin="5 0 10 0"/>
                      <TextBlock Text="{Binding DisplayName}" Grid.Column="1"/>
                    </Grid>
                  </DataTemplate>
                </ListBox.ItemTemplate>
              </ListBox>
              <GroupBox Header="Enter the rule description:" Margin="0 8 0 0" Padding="5">
                <ContentControl Content="{Binding RuleViewModel}">
                  <ContentControl.ContentTemplateSelector>
                    <dialogs:RuleDataTemplateSelector/>
                  </ContentControl.ContentTemplateSelector>
                </ContentControl>
              </GroupBox>
            </StackPanel>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton Content="OK" x:Name="PART_ButtonOK" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton Content="Cancel" x:Name="PART_ButtonCancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ManageConditionalFormattingDialogContentStyle" TargetType="dialogs:ManageConditionalFormattingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ConditionalFormattingRulesManager"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Width" Value="800"/>
    <Setter Property="MinHeight" Value="400"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ManageConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="16 16 16 0">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_ShowFormattingRulesFor" VerticalAlignment="Center"/>
              <telerik:RadComboBox
                      ItemsSource="{Binding ConditionalFormattingSources}"
                      SelectedValue="{Binding SelectedConditionalFormattingSource}"
                      DisplayMemberPath="DisplayName"
                      SelectedValuePath="Value"/>
            </StackPanel>
            <Border Grid.Row="1">
              <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding NewCommand}" Visibility="Collapsed">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/newRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_NewRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding EditCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/editRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_EditRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="100" Margin="1 5 2 5" Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/deleteRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DeleteRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="120" Margin="1 5 2 5" Command="{Binding DuplicateCommand}">
                    <telerik:RadButton.Content>
                      <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="{telerik:IconResource IconRelativePath=16/ConditionalFormatting/duplicateRule.png, IconSources={StaticResource IconPaths}}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_DuplicateRule" Margin="5 0 2 1"/>
                      </StackPanel>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveUpCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronUp}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                  <telerik:RadButton MinWidth="32" Margin="2 5" Command="{Binding MoveDownCommand}">
                    <telerik:RadButton.Content>
                      <telerik:RadGlyph
                              FontSize="16"
                              Foreground="{telerik:Office2019Resource ResourceKey=IconBrush}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              Glyph="{StaticResource GlyphArrowChevronDown}"/>
                    </telerik:RadButton.Content>
                  </telerik:RadButton>
                </StackPanel>
                <telerik:RadGridView
                        IsReadOnly="True"
                        RowHeight="34"
                        CanUserFreezeColumns="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        GridLinesVisibility="None"
                        ShowGroupPanel="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        Grid.Row="1"
                        ItemsSource="{Binding ConditionalFormattings}"
                        AutoGenerateColumns="False"
                        IsSynchronizedWithCurrentItem="True">
                  <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsSortable="False" IsFilterable="False" DataMemberBinding="{Binding Description}" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Rule"/>
                      </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewImageColumn ImageStretch="None" DataMemberBinding="{Binding FormatImage}" Width="150">
                      <telerik:GridViewImageColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_Format"/>
                      </telerik:GridViewImageColumn.Header>
                    </telerik:GridViewImageColumn>
                    <telerik:GridViewDataColumn IsReadOnly="True" Width="*">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_AppliesTo"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <TextBox Text="{Binding Range}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="105">
                      <telerik:GridViewDataColumn.Header>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ManageRulesDialog_StopIfTrue"/>
                      </telerik:GridViewDataColumn.Header>
                      <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                          <CheckBox IsChecked="{Binding StopIfTrue}" IsEnabled="{Binding CanStopIfTrue}"/>
                        </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
                  </telerik:RadGridView.Columns>
                </telerik:RadGridView>
              </Grid>
            </Border>
            <Border x:Name="HorizontalRule"
                    Grid.Row="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_ButtonOK" telerik:LocalizationManager.ResourceKey="Ok" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonCancel" telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_ButtonApply"
                        telerik:LocalizationManager.ResourceKey="Apply"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        IsEnabled="{Binding HasChanges}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="AlertIconTemplate">
    <Path Height="33" Stretch="Fill" Width="8" Data="{StaticResource AlertIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="AlertDialogContentStyle" TargetType="dialogs:AlertDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:AlertDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource AlertIconTemplate}" Margin="16 12 0 12"/>
            <TextBlock x:Name="AlertText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Margin="{StaticResource DialogsInnerContentMargin}"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterOneButtonMargin}">
                <telerik:RadButton
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="ConfirmIconTemplate">
    <Path Stretch="Fill" Width="22" Height="32" Data="{StaticResource ConfirmIcon}" Fill="{telerik:Windows11Resource ResourceKey=IconBrush}"/>
  </DataTemplate>
  <Style x:Key="ConfirmDialogContentStyle" TargetType="dialogs:ConfirmDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ConfirmDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter x:Name="Icon" VerticalAlignment="Top" ContentTemplate="{StaticResource ConfirmIconTemplate}" Margin="16 16 0 0"/>
            <TextBlock x:Name="ConfirmText"
                    Text="{Binding Path=Content}"
                    TextWrapping="Wrap"
                    Margin="{StaticResource DialogsInnerContentMargin}"
                    Grid.Row="0"
                    Grid.Column="1"
                    VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        IsTabStop="True"
                        TabIndex="0"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="21 0 2 0"/>
                <telerik:RadButton
                        Grid.Column="1"
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        VerticalAlignment="Center"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="StopDialogContentStyle" TargetType="dialogs:StopDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:StopDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="16 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/stop.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="16 8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="Retry"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Retry"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="WarningDialogContentStyle" TargetType="dialogs:WarningDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:WarningDialogContent">
          <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/warning.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        AutomationProperties.AutomationId="Yes"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Yes"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton x:Name="No"
                        AutomationProperties.AutomationId="No"
                        Command="{Binding Path=NoCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="No"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="InformationDialogContentStyle" TargetType="dialogs:InformationDialogContent">
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinWidth" Value="275"/>
    <Setter Property="MaxWidth" Value="500"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:InformationDialogContent">
          <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter VerticalAlignment="Top" Margin="10 8 8 8">
              <ContentPresenter.ContentTemplate>
                <DataTemplate>
                  <Image Width="32" Height="32" Source="{telerik:IconResource IconRelativePath=32/information.png, IconSources={StaticResource IconPaths}}"/>
                </DataTemplate>
              </ContentPresenter.ContentTemplate>
            </ContentPresenter>
            <TextBlock Text="{Binding Path=Content}" TextWrapping="Wrap" Margin="8" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
            <Border x:Name="HorizontalRule"
                    Grid.Row="1"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="OK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        AutomationProperties.AutomationId="OK"
                        Command="{Binding Path=OkCommand}"
                        MinWidth="112"
                        IsTabStop="True"
                        TabIndex="0"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        AutomationProperties.AutomationId="Cancel"
                        MinWidth="112"
                        Command="{Binding Path=CancelCommand}"
                        IsTabStop="True"
                        TabIndex="1"
                        HorizontalAlignment="Right"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnhideSheetDialogContentStyle" TargetType="dialogs:UnhideSheetDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Unhide"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnhideSheetDialogContent">
          <Grid Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_UnhideSheetDialog_UnhideSheet" Margin="0 5"/>
              <telerik:RadListBox
                      Grid.Row="1"
                      SelectedValue="{Binding SelectedHiddenSheetItem, Mode=TwoWay}"
                      ItemsSource="{Binding HiddenSheetItems, Mode=OneWay}"
                      DisplayMemberPath="Name"
                      ScrollViewer.VerticalScrollBarVisibility="Visible"
                      Height="110"
                      Margin="0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton x:Name="PART_OKButton"
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton x:Name="PART_CancelButton"
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CreateUpdateSpreadsheetNameDialogContentStyle" TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="320"/>
    <Setter Property="Height" Value="300"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Name" Margin="0 5" IsTabStop="False"/>
              <TextBox x:Name="Name" Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="1" Margin="5 5 0 5"/>
              <telerik:Label Padding="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Scope" Grid.Row="1" Grid.Column="0" Margin="0 5" IsTabStop="False"/>
              <telerik:RadComboBox x:Name="Scope"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=Scopes}"
                      SelectedItem="{Binding Path=SelectedScope, Mode=TwoWay}"
                      IsEnabled="{Binding Path=CanChangeScope}"
                      Margin="5 5 0 5"
                      MinWidth="120"
                      HorizontalAlignment="Left">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource NameScopeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_Comment"
                      Grid.Row="2"
                      Grid.Column="0"
                      Margin="0 5"
                      IsTabStop="False"/>
              <TextBox x:Name="Comment"
                      Grid.Row="2"
                      Grid.Column="1"
                      Text="{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Margin="5 5 0 5"
                      TextWrapping="Wrap"
                      VerticalContentAlignment="Top"
                      VerticalScrollBarVisibility="Visible"/>
              <telerik:Label
                      Padding="0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_CreateUpdateSpreadsheetNameDialog_RefersTo"
                      IsTabStop="False"
                      Grid.Row="3"
                      Grid.Column="0"
                      Margin="0 5"/>
              <TextBox x:Name="RefersTo" Text="{Binding Path=RefersTo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="1" Margin="5 5 0 5"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OkCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Command="{Binding Path=CloseCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ProtectDialogContentStyle" TargetType="dialogs:ProtectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:ProtectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_Password" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock Grid.Row="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_RepeatPassword" Margin="0 5 0 0" VerticalAlignment="Center"/>
              <PasswordBox Grid.Row="1" Grid.Column="1" dialogs:PasswordHelper.Password="{Binding ProtectionRepeatPassword, Mode=TwoWay}" Margin="5 5 0 0" MinHeight="32"/>
              <TextBlock
                      Grid.ColumnSpan="2"
                      Grid.Row="2"
                      Margin="0 10 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_ProtectDialog_AllowUsersTo"
                      Visibility="{Binding HasProtectionOptions, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <ItemsControl Grid.ColumnSpan="2" Grid.Row="3" ItemsSource="{Binding ProtectionOptions}" Margin="0 5 0 0">
                <ItemsControl.ItemTemplate>
                  <DataTemplate>
                    <CheckBox IsChecked="{Binding Value, Mode=TwoWay}" Content="{Binding Title, Mode=OneWay}" Margin="0 2"/>
                  </DataTemplate>
                </ItemsControl.ItemTemplate>
              </ItemsControl>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CloseCommand}" Grid.Column="1" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="UnprotectDialogContentStyle" TargetType="dialogs:UnprotectDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="340"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:UnprotectDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <TextBlock Margin="0 0 5 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_UnprotectDialog_Password" VerticalAlignment="Center"/>
              <PasswordBox
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      dialogs:PasswordHelper.Password="{Binding ProtectionPassword, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      Margin="0 5 0 0"
                      Height="32"/>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid x:Name="DialogButtons" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding Path=OkCommand}" Margin="21 0 2 0" BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Grid.Column="1" Command="{Binding Path=CloseCommand}" Margin="2 0 21 0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageTabContentStyle" TargetType="dialogs:PageTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Orientation"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/portrait.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Portrait"
                      GroupName="PortraitOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Portrait, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
              <Image
                      Source="{telerik:IconResource IconRelativePath=Printing/landscape.png, IconSources={StaticResource IconPaths}}"
                      Stretch="None"
                      Margin="{StaticResource GeneralLabelOffset}"
                      UseLayoutRounding="True"/>
              <RadioButton
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Landscape"
                      GroupName="LandscapeOption"
                      IsChecked="{Binding Path=Orientation, Converter={StaticResource PageOrientationToBooleanConverter}, ConverterParameter=Landscape, Mode=TwoWay}"
                      Margin="4 2 0 0"/>
            </StackPanel>
            <Grid Grid.Row="2" Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Scaling"
                      HorizontalAlignment="Left"
                      Margin="0 0 0 5"
                      Style="{StaticResource HeaderTextBlockStyle}"/>
              <Border Grid.Column="1" Margin="2 15 0 0" Height="1" Background="Transparent"/>
            </Grid>
            <ContentControl IsEnabled="{Binding IsScalingEnabled}" Grid.Row="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
              <Grid HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RadioButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AdjustTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Column="1"
                        Value="{Binding Path=ScaleFactorPercent, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0 5 4"
                        Minimum="{Binding ScaleFactorPercentMinimum}"
                        Maximum="{Binding ScaleFactorPercentMaximum}"
                        SmallChange="5"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=AdjustTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PercentNormalSize"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <RadioButton
                        Grid.Row="1"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_FitTo"
                        GroupName="AdjustToOption"
                        IsChecked="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=TwoWay}"
                        Margin="{StaticResource GeneralLabelOffset}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="1"
                        Value="{Binding Path=FitToPagesWide, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PagesWideBy"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
                <telerik:RadNumericUpDown
                        Grid.Row="1"
                        Grid.Column="3"
                        Value="{Binding Path=FitToPagesTall, Mode=TwoWay}"
                        IsInteger="True"
                        Margin="5 0"
                        Minimum="{Binding FitToPagesMinimum}"
                        Maximum="{Binding FitToPagesMaximum}"
                        HorizontalAlignment="Left"
                        Width="110"
                        IsEnabled="{Binding Path=ScalingMethod, Converter={StaticResource ScalingMethodToBooleanConverter}, ConverterParameter=FitTo, Mode=OneWay}"/>
                <TextBlock
                        Grid.Row="1"
                        Grid.Column="4"
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_tall"
                        VerticalAlignment="Center"
                        Foreground="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
              </Grid>
            </ContentControl>
            <StackPanel Margin="0 10 0 0" Grid.Row="4">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PaperSize" VerticalAlignment="Center"/>
                <telerik:RadComboBox Grid.Column="1" ItemsSource="{Binding Path=PaperTypes}" Margin="5 0" SelectedItem="{Binding Path=SelectedPaperType, Mode=TwoWay}"/>
              </Grid>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MarginsTabContentStyle" TargetType="dialogs:MarginsTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:MarginsTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="148"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="255"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Top"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Top, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Header, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Left"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Left, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <Image
                        Grid.Row="1"
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Source="{Binding MarginsImage, Mode=OneWay}"
                        Stretch="None"
                        UseLayoutRounding="True"
                        Margin="10"/>
                <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Right"/>
                  <telerik:RadNumericUpDown Value="{Binding Path=Right, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center">
                  <StackPanel>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Bottom"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Bottom, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                  <StackPanel Margin="5 0 0 0">
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer"/>
                    <telerik:RadNumericUpDown Value="{Binding Path=Footer, Mode=TwoWay}" Minimum="0" SmallChange="{Binding SmallChange}" Width="110"/>
                  </StackPanel>
                </StackPanel>
              </Grid>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CenterOnPage" Margin="0 10 0 0"/>
              <ContentControl IsEnabled="{Binding IsCenterOnPageEnabled}" Margin="0" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <StackPanel>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Horizontally" IsChecked="{Binding Path=CenterHorizontally, Mode=TwoWay}"/>
                  <CheckBox Margin="0 3 0 0" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Vertically" IsChecked="{Binding Path=CenterVertically, Mode=TwoWay}"/>
                </StackPanel>
              </ContentControl>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SheetTabContentStyle" TargetType="dialogs:SheetTabContent">
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="Padding" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SheetTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Margin="0 0 0 5" HorizontalAlignment="Left" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="2 12 0 0" Height="1" Background="Transparent"/>
              </Grid>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Gridlines"
                      IsChecked="{Binding Path=PrintGridlines, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <CheckBox
                      Margin="0 5 0 0"
                      telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_RowAndColumnHeadings"
                      IsChecked="{Binding Path=PrintRowColumnHeadings, Mode=TwoWay}"
                      Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}"/>
              <StackPanel Margin="0 10 0 0" Visibility="{Binding IsWorksheetActive, Converter={StaticResource BoolToVisibilityValueConverter}}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <TextBlock
                          telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_PageOrder"
                          Margin="0 12 0 5"
                          HorizontalAlignment="Left"
                          Style="{StaticResource HeaderTextBlockStyle}"/>
                  <Border HorizontalAlignment="Stretch" Height="1" Grid.Column="1" Margin="5 12 0 0" Background="Transparent"/>
                </Grid>
                <StackPanel Orientation="Horizontal" Margin="0 5 0 0">
                  <StackPanel>
                    <RadioButton x:Name="DownThenOverButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DownThenOver"
                            GroupName="DownThenOverOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=DownThenOver, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                    <RadioButton x:Name="OverThenDownButton"
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_OverThenDown"
                            GroupName="OverThenDownOption"
                            IsChecked="{Binding Path=PageOrder, Converter={StaticResource PageOrderToBooleanConverter}, ConverterParameter=OverThenDown, Mode=TwoWay}"
                            Margin="0 5 0 0"/>
                  </StackPanel>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/downThenOver.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=DownThenOverButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                  <Image
                          Source="{telerik:IconResource IconRelativePath=Printing/overThenDown.png, IconSources={StaticResource IconPaths}}"
                          Stretch="None"
                          Margin="10 0 0 0"
                          Visibility="{Binding ElementName=OverThenDownButton,Path=IsChecked, Converter={StaticResource SpreadsheetBooleanToVisibilityConverter}}"/>
                </StackPanel>
              </StackPanel>
            </StackPanel>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterTabContentStyle" TargetType="dialogs:HeaderFooterTabContent">
    <Setter Property="MinHeight" Value="420"/>
    <Setter Property="MinWidth" Value="525"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Padding" Value="20 0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel>
              <Grid Margin="{StaticResource FormatCellsTabContentSamplesMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Header" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding HeaderTemplates}"
                      SelectedItem="{Binding SelectedHeaderTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomHeader" Command="{Binding CreateCustomHeaderCommand}" VerticalAlignment="Center"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_CustomFooter"
                        Command="{Binding CreateCustomFooterCommand}"
                        Margin="5 0"
                        VerticalAlignment="Center"/>
              </StackPanel>
              <Grid Margin="0 5 0 0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_Footer" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
                <Border Grid.Column="1" Margin="5 0 0 0" Height="1" Background="{TemplateBinding BorderBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Grid>
              <telerik:RadComboBox
                      IsEnabled="{Binding AreHeadersAndFootersSameForAllPages}"
                      ItemsSource="{Binding FooterTemplates}"
                      SelectedItem="{Binding SelectedFooterTemplate, Mode=TwoWay}"
                      DisplayMemberPath="TextPreview"
                      Margin="0 5 0 5"/>
              <CheckBox telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentOddAndEvenPages" Margin="{StaticResource GeneralLabelOffset}" IsChecked="{Binding Path=DifferentOddAndEvenPages, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_DifferentFirstPage" IsChecked="{Binding Path=DifferentFirstPage, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_ScaleWithDocument" IsChecked="{Binding Path=ScaleWithDocument, Mode=TwoWay}"/>
              <CheckBox Margin="{StaticResource GeneralLabelOffset}" telerik:LocalizationManager.ResourceKey="Spreadsheet_PageSetupDialog_AlignWithPageMargins" IsChecked="{Binding Path=AlignWithPageMargins, Mode=TwoWay}"/>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="PageSetupDialogContentStyle" TargetType="dialogs:PageSetupDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:PageSetupDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*" MinHeight="205"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl x:Name="TabControl" MinWidth="450" MinHeight="455" Background="{TemplateBinding Background}" BorderThickness="0">
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding PageTab}" MinWidth="55">
                <dialogs:PageTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding MarginsTab}" MinWidth="55">
                <dialogs:MarginsTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding HeaderFooterTab}" MinWidth="55">
                <dialogs:HeaderFooterTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem Header="{Binding TabHeader}" IsSelected="{Binding IsSelected, Mode=TwoWay}" DataContext="{Binding SheetTab}" MinWidth="55">
                <dialogs:SheetTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <Grid Margin="{StaticResource DialogsFooterMargin}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Spreadsheet_Printing_Print" Command="{Binding PrintCommand}" VerticalAlignment="Center" MinWidth="112"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        Grid.Column="2"
                        MinWidth="112"
                        VerticalAlignment="Center"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding CloseCommand}"
                        Grid.Column="3"
                        MinWidth="112"
                        VerticalAlignment="Center"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SortingDialogContentStyle" TargetType="dialogs:SortingDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_SortingDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="600"/>
    <Setter Property="Height" Value="350"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SortingDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <StackPanel Orientation="Horizontal" Grid.Row="0">
                <telerik:RadButton Command="{Binding Path=AddLevelCommand}" MinWidth="100" Margin="1 5 2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphPlus}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_AddLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=DeleteLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_DeleteLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=CopyLevelCommand}" MinWidth="100" Margin="2 5" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <StackPanel Orientation="Horizontal">
                      <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphCopy}"/>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_SortingDialog_CopyLevel" Margin="10 0 0 0"/>
                    </StackPanel>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <Border BorderBrush="{TemplateBinding BorderBrush}" Width="1" Margin="8 5" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" UseLayoutRounding="True"/>
                <telerik:RadButton Command="{Binding Path=MoveUpCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
                <telerik:RadButton Command="{Binding Path=MoveDownCommand}" MinWidth="32" Margin="2 5" Padding="3" VerticalAlignment="Center">
                  <telerik:RadButton.Content>
                    <telerik:RadGlyph
                            Foreground="{telerik:Windows11Resource ResourceKey=IconBrush}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphArrowChevronDown}"/>
                  </telerik:RadButton.Content>
                </telerik:RadButton>
              </StackPanel>
              <Border Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid Background="{TemplateBinding Background}">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="0">
                      <TextBlock Text="Column" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0" Grid.Column="1">
                      <TextBlock Text="Sort On" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                    <Border Grid.Column="2">
                      <TextBlock Text="Order" Margin="0 5" VerticalAlignment="Center"/>
                    </Border>
                  </Grid>
                  <telerik:RadListBox Grid.Row="1" ItemsSource="{Binding Path=SortConditions}" SelectedIndex="{Binding Path=SelectedSortConditionIndex, Mode=TwoWay}" BorderThickness="0 1 0 0">
                    <telerik:RadListBox.ItemTemplate>
                      <DataTemplate>
                        <Grid>
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                          </Grid.ColumnDefinitions>
                          <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="Auto"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Header}" Width="50" Grid.Column="0" VerticalAlignment="Center"/>
                            <telerik:RadComboBox
                                    Grid.Column="1"
                                    ItemsSource="{Binding Path=SortByItemsSource}"
                                    SelectedItem="{Binding Path=SelectedRelativeIndex, Mode=TwoWay}"
                                    HorizontalAlignment="Stretch"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                  <ContentPresenter Content="{Binding Path=., Converter={StaticResource IntToColumnNameConverter}}"/>
                                </DataTemplate>
                              </telerik:RadComboBox.ItemTemplate>
                            </telerik:RadComboBox>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  SelectedItem="{Binding Path=SelectedSortType, Mode=TwoWay}"
                                  ItemsSource="{Binding Path=SortTypesItemsSource}"
                                  Margin="0 0 10 0">
                            <telerik:RadComboBox.ItemTemplate>
                              <DataTemplate>
                                <ContentPresenter Content="{Binding Path=., Converter={StaticResource SortTypeToStringConverter}}"/>
                              </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                          </telerik:RadComboBox>
                          <Grid Grid.Column="2" Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource BoolToVisibilityValueConverter}}">
                            <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="*"/>
                              <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadComboBox x:Name="ColorSelector"
                                    Grid.Column="0"
                                    HorizontalAlignment="Stretch"
                                    Width="88"
                                    SelectedIndex="{Binding Path=SelectedFillIndex, Mode=TwoWay}"
                                    ItemsSource="{Binding Path=FillsItemsSource}"
                                    Margin="0 0 10 0">
                              <telerik:RadComboBox.ItemTemplateSelector>
                                <spreadsheetUtilities:PatternGradientFillTemplateSelector>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                    <DataTemplate>
                                      <TextBlock Text="No Fill" Width="80" Height="18"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.DefaultPatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:PatternFillControl
                                              Width="80"
                                              Height="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              PatternType="{Binding Path=PatternType}"
                                              PatternColor="{Binding Path=., Converter={StaticResource PatternFillToPatternColorConverter}}"
                                              BackgroundColor="{Binding Path=., Converter={StaticResource PatternFillToBackgroundColorConverter}}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.PatternFillTemplate>
                                  <spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                    <DataTemplate>
                                      <spreadsheetControls:GradientFillControl
                                              MaxWidth="80"
                                              MaxHeight="18"
                                              ColorScheme="{Binding ElementName=ColorSelector, Path=DataContext.ColorPalette.ColorScheme}"
                                              GradientType="{Binding Path=GradientType}"
                                              Color1="{Binding Path=Color1}"
                                              Color2="{Binding Path=Color2}"/>
                                    </DataTemplate>
                                  </spreadsheetUtilities:PatternGradientFillTemplateSelector.GradientFillTemplate>
                                </spreadsheetUtilities:PatternGradientFillTemplateSelector>
                              </telerik:RadComboBox.ItemTemplateSelector>
                            </telerik:RadComboBox>
                            <telerik:RadComboBox HorizontalAlignment="Stretch" Grid.Column="1" ItemsSource="{Binding Path=SortOrderItemsSource}" SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"/>
                          </Grid>
                          <telerik:RadComboBox
                                  Grid.Column="2"
                                  HorizontalAlignment="Stretch"
                                  MaxWidth="185"
                                  Visibility="{Binding Path=IsColorsSortOrderVisible, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Path=SortOrderItemsSource}"
                                  SelectedIndex="{Binding Path=SelectedSortOrderIndex, Mode=TwoWay}"
                                  ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                            <telerik:RadComboBox.ItemsPanel>
                              <ItemsPanelTemplate>
                                <StackPanel MaxWidth="300"/>
                              </ItemsPanelTemplate>
                            </telerik:RadComboBox.ItemsPanel>
                          </telerik:RadComboBox>
                        </Grid>
                      </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                    <telerik:RadListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type telerik:RadListBoxItem}" BasedOn="{StaticResource RadListBoxItemStyle}"/>
                    </telerik:RadListBox.ItemContainerStyle>
                  </telerik:RadListBox>
                </Grid>
              </Border>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomSortListsDialogContentStyle" TargetType="dialogs:CustomSortListsDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_CustomSortListsDialog_Header"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="610"/>
    <Setter Property="Height" Value="356"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomSortListsDialogContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <telerik:RadTabControl BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsHeader">
                <Grid Margin="{StaticResource DialogsInnerContentMargin}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="236"/>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="240"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_CustomListsLabel"/>
                  <telerik:RadListBox
                          Grid.Row="1"
                          Grid.Column="0"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          SelectedIndex="{Binding Path=SelectedCustomListIndex, Mode=TwoWay}"
                          ItemsSource="{Binding Path=CustomListsItemsSource}"/>
                  <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_ListEntriesLabel" Margin="10 0 0 0" Grid.Row="0" Grid.Column="1"/>
                  <TextBox
                          Grid.Row="1"
                          Grid.Column="1"
                          Margin="10 0 0 0"
                          AcceptsReturn="True"
                          IsEnabled="{Binding Path=IsEnabled}"
                          VerticalContentAlignment="Top"
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.VerticalScrollBarVisibility="Visible"
                          Text="{Binding Path=ListItems, Mode=TwoWay}"/>
                  <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center">
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Add"
                            Margin="10 0 0 10"
                            Command="{Binding Path=AddCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                    <telerik:RadButton
                            telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomSortListsDialog_Delete"
                            Margin="10 0 0 0"
                            Command="{Binding Path=DeleteCommand}"
                            VerticalAlignment="Center"
                            MinWidth="112"/>
                  </StackPanel>
                </Grid>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding Path=CancelCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="TopFilterDialogContentStyle" TargetType="dialogs:TopFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="300"/>
    <Setter Property="Height" Value="150"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:TopFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_TopFilterDialog_Show" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      Margin="0 5"
                      ItemsSource="{Binding Path=TopBottomItemsSource}"
                      SelectedValue="{Binding Path=SelectedTopBottom, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource TopBottomFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding Path=SelectedValue, Mode=TwoWay}" IsInteger="True" Margin="5"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      Grid.Column="2"
                      Margin="0 5"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ItemsPercentItemsSource}"
                      SelectedValue="{Binding Path=SelectedItemsPercent, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ItemsPercentFilterTypeToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        Command="{Binding Path=OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CustomFilterDialogContentStyle" TargetType="dialogs:CustomFilterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Width" Value="400"/>
    <Setter Property="Height" Value="200"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:CustomFilterDialogContent">
          <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <Grid Margin="{StaticResource DialogsInnerContentMargin}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_ShowRowsWhere" Margin="0 0 0 5" Style="{StaticResource HeaderTextBlockStyle}"/>
              <telerik:RadComboBox
                      Grid.Row="1"
                      HorizontalAlignment="Stretch"
                      ItemsSource="{Binding Path=ComparisonOperatorItemsSource}"
                      SelectedValue="{Binding Path=SelectedComparisonOperator1, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Value1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
              <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=And}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_And"/>
                <RadioButton IsChecked="{Binding Path=SelectedLogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToBooleanConverter}, ConverterParameter=Or}" Margin="5 3" telerik:LocalizationManager.ResourceKey="Spreadsheet_CustomFilterDialog_Or"/>
              </StackPanel>
              <telerik:RadComboBox Grid.Row="3" ItemsSource="{Binding Path=ComparisonOperatorItemsSource}" SelectedValue="{Binding Path=SelectedComparisonOperator2, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Converter={StaticResource ComparisonOperatorItemToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
              <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Value2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5 0 0 0"/>
            </Grid>
            <Border
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        x:Name="PART_ButtonOK"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"
                        Command="{Binding Path=OKCommand}"
                        VerticalAlignment="Center"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Cancel"
                        x:Name="PART_ButtonCancel"
                        Command="{Binding Path=CancelCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogTabContentStyle" TargetType="dialogs:HeaderFooterDialogTabContent">
    <Setter Property="Height" Value="315"/>
    <Setter Property="Width" Value="630"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogTabContent">
          <Grid Margin="{TemplateBinding Padding}">
            <Grid.Resources>
              <Style TargetType="{x:Type Paragraph}">
                <Setter Property="Margin" Value="0"/>
              </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition/>
              <ColumnDefinition/>
              <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="3">
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToFormatText" TextWrapping="Wrap" HorizontalAlignment="Left"/>
              <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_ToInsertField" TextWrapping="Wrap" Margin="0 10 0 0" HorizontalAlignment="Left"/>
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" UseLayoutRounding="True">
                <telerik:RadButton Command="{Binding Path=FormatTextCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                  <telerik:RadButton.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_FormatText"/>
                  </telerik:RadButton.ToolTip>
                  <Image
                          Stretch="None"
                          Source="{telerik:IconResource IconRelativePath=Printing/16/formatText.png, IconSources={StaticResource IconPaths}}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </telerik:RadButton>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertPageNumberCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertPageNumber"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertPageNumber.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertNumberOfPagesCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertNumberOfPages"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertNumberOfPages.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertDateCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertDate"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addDate.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertTimeCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertTime"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/addTime.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                  <telerik:RadButton Command="{Binding Path=InsertFilePathCommand}" IsTabStop="False" Focusable="False" Margin="0 0 1 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFilePath"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFilePath.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertFileNameCommand}" IsTabStop="False" Focusable="False" Margin="0 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertFileName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertFileName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                  <telerik:RadButton Command="{Binding Path=InsertSheetNameCommand}" IsTabStop="False" Focusable="False" Margin="1 0 0 3" Padding="0">
                    <telerik:RadButton.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_InsertSheetName"/>
                    </telerik:RadButton.ToolTip>
                    <Image
                            Stretch="None"
                            Source="{telerik:IconResource IconRelativePath=Printing/16/insertSheetName.png, IconSources={StaticResource IconPaths}}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                  </telerik:RadButton>
                </StackPanel>
              </StackPanel>
            </StackPanel>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_LeftSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="1"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_CenterSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock
                    Grid.Row="1"
                    Grid.Column="2"
                    telerik:LocalizationManager.ResourceKey="Spreadsheet_HeaderFooterDialog_RightSection"
                    HorizontalAlignment="Left"
                    Style="{StaticResource HeaderTextBlockStyle}"/>
            <RichTextBox Grid.Row="2" Grid.Column="0" x:Name="PART_LeftSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox
                    Grid.Row="2"
                    Grid.Column="1"
                    x:Name="PART_CenterSectionBox"
                    Margin="5 0"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            <RichTextBox Grid.Row="2" Grid.Column="2" x:Name="PART_RightSectionBox" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HeaderFooterDialogContentStyle" TargetType="dialogs:HeaderFooterDialogContent">
    <Setter Property="Header" Value="{Binding DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:HeaderFooterDialogContent">
          <Grid
                  Background="{TemplateBinding Background}"
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                  Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition MinHeight="32"/>
            </Grid.RowDefinitions>
            <telerik:RadTabControl x:Name="TabControl" BorderThickness="0" Background="{TemplateBinding Background}">
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding FirstPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding DefaultContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
              <telerik:RadTabItem
                      Header="{Binding TabHeader}"
                      Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityValueConverter}}"
                      DataContext="{Binding EvenPageContent}"
                      MinWidth="55"
                      IsSelected="{Binding IsSelected}">
                <dialogs:HeaderFooterDialogTabContent/>
              </telerik:RadTabItem>
            </telerik:RadTabControl>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{Binding OKCommand}"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="FormatFontDialogContentStyle" TargetType="dialogs:FormatFontDialogContent">
    <Setter Property="telerik:LocalizationManager.ResourceKey" Value="Spreadsheet_FormatCellsDialog_Font_Header"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FontFamily" Value="{telerik:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="MaxWidth" Value="750"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:FormatFontDialogContent">
          <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <dialogs:FontTabContent x:Name="PART_FontTabContent" Margin="0 0 0 20"/>
            <Border
                    Grid.Row="2"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}">
                <telerik:RadButton
                        telerik:LocalizationManager.ResourceKey="Ok"
                        MinWidth="112"
                        Margin="{StaticResource DialogsFooterButtonMargin}"
                        Command="{Binding OKCommand}"
                        BorderBrush="{telerik:Windows11Resource ResourceKey=FocusBrush}"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}" Command="{Binding CloseCommand}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="SingleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="DoubleValuePickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TextBox x:Name="Argument" Text="{Binding Path=Argument, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" AutomationProperties.Name="Argument"/>
      <telerik:Label Grid.Column="1" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_And" Padding="0" Margin="5 0" IsTabStop="False"/>
      <TextBox x:Name="Argument1"
              Grid.Column="2"
              VerticalAlignment="Center"
              Text="{Binding Path=Argument1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
              AutomationProperties.Name="Argument 1"/>
      <telerik:Label Grid.Column="3" telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With" Padding="0" Margin="5 0" IsTabStop="False"/>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="ComboBoxPickerTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadComboBox x:Name="ValuePicker"
              ItemsSource="{Binding Path=ComboBoxItemsSource}"
              SelectedItem="{Binding Path=ComboBoxSelectedItem, Mode=TwoWay}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Select Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ValuesWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsDate, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NumericUpDownTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <telerik:RadNumericUpDown x:Name="NumericValuePicker"
              Minimum="{Binding NumericMinimum}"
              Maximum="{Binding NumericMaximum}"
              Value="{Binding NumericValue}"
              VerticalAlignment="Center"
              AutomationProperties.Name="Numeric Value"/>
      <Grid Grid.Column="1" Margin="5 0">
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_With"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
        <telerik:Label
                telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_PercentWith"
                Padding="0"
                IsTabStop="False"
                Visibility="{Binding IsPercentage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </Grid>
    </Grid>
  </DataTemplate>
  <DataTemplate x:Key="NoPickerTemplate">
    <telerik:Label telerik:LocalizationManager.ResourceKey="Spreadsheet_ConditionalFormatting_ForTheSelectedRangeWith" Padding="0" Margin="5 0" IsTabStop="False"/>
  </DataTemplate>
  <Style x:Key="SimpleConditionalFormattingDialogContentStyle" TargetType="dialogs:SimpleConditionalFormattingDialogContent">
    <Setter Property="Header" Value="{Binding Path=DialogHeader}"/>
    <Setter Property="FontFamily" Value="{telerik1:Windows11Resource ResourceKey=FontFamily}"/>
    <Setter Property="FontSize" Value="{telerik1:Windows11Resource ResourceKey=FontSize}"/>
    <Setter Property="Foreground" Value="{telerik1:Windows11Resource ResourceKey=PrimaryForegroundBrush}"/>
    <Setter Property="Background" Value="{telerik:Windows11Resource ResourceKey=OverlayBrush}"/>
    <Setter Property="BorderBrush" Value="{telerik:Windows11Resource ResourceKey=PrimaryBorderBrush}"/>
    <Setter Property="Width" Value="520"/>
    <Setter Property="Height" Value="160"/>
    <Setter Property="Padding" Value="{StaticResource DialogsInnerContentMargin}"/>
    <Setter Property="ResizeMode" Value="NoResize"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="dialogs:SimpleConditionalFormattingDialogContent">
          <Grid Background="{TemplateBinding Background}">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Margin="{TemplateBinding Padding}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <telerik:Label Grid.ColumnSpan="2" Content="{Binding RuleDescription}" Padding="0" Margin="0 5" IsTabStop="False" FontWeight="SemiBold"/>
              <ContentControl Grid.Row="1" Grid.Column="0" Margin="0 5" Content="{Binding .}">
                <ContentControl.ContentTemplateSelector>
                  <dialogs:ConditionalFormattingValuePickerTemplateSelector
                          SingleValuePickerTemplate="{StaticResource SingleValuePickerTemplate}"
                          DoubleValuePickerTemplate="{StaticResource DoubleValuePickerTemplate}"
                          ComboBoxPickerTemplate="{StaticResource ComboBoxPickerTemplate}"
                          NumericUpDownTemplate="{StaticResource NumericUpDownTemplate}"
                          NoPickerTemplate="{StaticResource NoPickerTemplate}"/>
                </ContentControl.ContentTemplateSelector>
              </ContentControl>
              <telerik:RadComboBox x:Name="FormatPicker"
                      Grid.Row="1"
                      Grid.Column="1"
                      ItemsSource="{Binding Path=FormatPickerItemsSource}"
                      SelectedItem="{Binding Path=SelectedFormat, Mode=TwoWay}"
                      VerticalAlignment="Center"
                      AutomationProperties.Name="Select Format">
                <telerik:RadComboBox.ItemTemplate>
                  <DataTemplate>
                    <TextBlock Text="{Binding Mode=OneWay, Converter={StaticResource PredefinedConditionalFormatToStringConverter}}"/>
                  </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
              </telerik:RadComboBox>
            </Grid>
            <Border
                    Grid.Row="1"
                    Background="{telerik1:Windows11Resource ResourceKey=AlternativeBrush}"
                    BorderBrush="{telerik1:Windows11Resource ResourceKey=PrimaryBorderBrush}"
                    BorderThickness="0 1 0 0"
                    MinHeight="64">
              <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="{StaticResource DialogsFooterMargin}" VerticalAlignment="Center">
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Ok" Command="{Binding OkCommand}" MinWidth="112"/>
                <telerik:RadButton telerik:LocalizationManager.ResourceKey="Cancel" Command="{Binding CloseCommand}" MinWidth="112" Margin="{StaticResource DialogsFooterButtonMargin}"/>
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="dialogs:InsertChartDialogContent" BasedOn="{StaticResource InsertChartDialogContentStyle}"/>
  <Style TargetType="dialogs:FillEffectsDialogContent" BasedOn="{StaticResource FillEffectsDialogContentStyle}"/>
  <Style TargetType="dialogs:GeneralCategoryContent" BasedOn="{StaticResource GeneralCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberCategoryContent" BasedOn="{StaticResource NumberCategoryContentStyle}"/>
  <Style TargetType="dialogs:CurrencyCategoryContent" BasedOn="{StaticResource CurrencyCategoryContentStyle}"/>
  <Style TargetType="dialogs:AccountingCategoryContent" BasedOn="{StaticResource AccountingCategoryContentStyle}"/>
  <Style TargetType="dialogs:DateCategoryContent" BasedOn="{StaticResource DateCategoryContentStyle}"/>
  <Style TargetType="dialogs:TimeCategoryContent" BasedOn="{StaticResource TimeCategoryContentStyle}"/>
  <Style TargetType="dialogs:PercentageCategoryContent" BasedOn="{StaticResource PercentageCategoryContentStyle}"/>
  <Style TargetType="dialogs:FractionCategoryContent" BasedOn="{StaticResource FractionCategoryContentStyle}"/>
  <Style TargetType="dialogs:ScientificCategoryContent" BasedOn="{StaticResource ScientificCategoryContentStyle}"/>
  <Style TargetType="dialogs:TextCategoryContent" BasedOn="{StaticResource TextCategoryContentStyle}"/>
  <Style TargetType="dialogs:SpecialCategoryContent" BasedOn="{StaticResource SpecialCategoryContentStyle}"/>
  <Style TargetType="dialogs:CustomCategoryContent" BasedOn="{StaticResource CustomCategoryContentStyle}"/>
  <Style TargetType="dialogs:NumberTabContent" BasedOn="{StaticResource NumberTabContentStyle}"/>
  <Style TargetType="dialogs:FillTabContent" BasedOn="{StaticResource FillTabContentStyle}"/>
  <Style TargetType="dialogs:ProtectionTabContent" BasedOn="{StaticResource ProtectionTabContentStyle}"/>
  <Style TargetType="dialogs:AlignmentTabContent" BasedOn="{StaticResource AlignmentTabContentStyle}"/>
  <Style TargetType="dialogs:FontTabContent" BasedOn="{StaticResource FontTabContentStyle}"/>
  <Style TargetType="dialogs:BorderTabContent" BasedOn="{StaticResource BorderTabContentStyle}"/>
  <Style TargetType="dialogs:BorderStyleSelector" BasedOn="{StaticResource BorderStyleSelectorStyle}"/>
  <Style TargetType="dialogs:BorderSelector" BasedOn="{StaticResource BorderSelectorStyle}"/>
  <Style TargetType="dialogs:FormatCellsDialogContent" BasedOn="{StaticResource FormatCellsDialogContentStyle}"/>
  <Style TargetType="dialogs:DecimalNumberPromptDialogContent" BasedOn="{StaticResource DecimalNumberPromptDialogStyle}"/>
  <Style TargetType="dialogs:InsertCellsDialogContent" BasedOn="{StaticResource InsertCellsDialogStyle}"/>
  <Style TargetType="dialogs:RemoveCellsDialogContent" BasedOn="{StaticResource RemoveCellsDialogStyle}"/>
  <Style TargetType="dialogs:ScaleFactorDialogContent" BasedOn="{StaticResource ScaleFactorDialogStyle}"/>
  <Style TargetType="dialogs:InsertFunctionDialogContent" BasedOn="{StaticResource InsertFunctionDialogContentStyle}"/>
  <Style TargetType="dialogs:FunctionArgumentsDialogContent" BasedOn="{StaticResource FunctionArgumentsDialogContentStyle}"/>
  <Style TargetType="dialogs:InsertFunctionArgumentControl" BasedOn="{StaticResource InsertFunctionArgumentControlStyle}"/>
  <Style TargetType="dialogs:StyleDialogContent" BasedOn="{StaticResource StyleDialogContentStyle}"/>
  <Style TargetType="dialogs:SelectColorDialogContent" BasedOn="{StaticResource SelectColorDialogStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorSampleControl" BasedOn="{StaticResource CreateNewThemeColorSampleControlStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeColorsDialogContent" BasedOn="{StaticResource CreateNewThemeColorsDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateNewThemeFontsDialogContent" BasedOn="{StaticResource CreateNewThemeFontsDialogContentStyle}"/>
  <Style TargetType="dialogs:SeriesDialogContent" BasedOn="{StaticResource SeriesDialogContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkEmailCategoryContent" BasedOn="{StaticResource HyperlinkEmailCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkInDocumentCategoryContent" BasedOn="{StaticResource HyperlinkInDocumentCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkWebPageCategoryContent" BasedOn="{StaticResource HyperlinkWebPageCategoryContentStyle}"/>
  <Style TargetType="dialogs:HyperlinkDialogContent" BasedOn="{StaticResource HyperlinkDialogContentStyle}"/>
  <Style TargetType="dialogs:FindAndReplaceDialogContent" BasedOn="{StaticResource FindAndReplaceDialogContentStyle}"/>
  <Style TargetType="dialogs:NameManagerDialogContent" BasedOn="{StaticResource NameManagerDialogContentStyle}"/>
  <Style TargetType="dialogs:DataValidationDialogContent" BasedOn="{StaticResource DataValidationDialogContentStyle}"/>
  <Style TargetType="dialogs:ManageConditionalFormattingDialogContent" BasedOn="{StaticResource ManageConditionalFormattingDialogContentStyle}"/>
  <Style TargetType="dialogs:ConditionalFormattingDialogContent" BasedOn="{StaticResource ConditionalFormattingContentStyle}"/>
  <Style TargetType="dialogs:ContainView" BasedOn="{StaticResource ContainViewStyle}"/>
  <Style TargetType="dialogs:ValueView" BasedOn="{StaticResource ValueViewStyle}"/>
  <Style TargetType="dialogs:FormulaView" BasedOn="{StaticResource FormulaViewStyle}"/>
  <Style TargetType="dialogs:AverageView" BasedOn="{StaticResource AverageViewStyle}"/>
  <Style TargetType="dialogs:OccurrenceView" BasedOn="{StaticResource OccurrenceViewStyle}"/>
  <Style TargetType="dialogs:TopBottomView" BasedOn="{StaticResource TopBottomViewStyle}"/>
  <Style TargetType="dialogs:DataBarDialogContent" BasedOn="{StaticResource DataBarDialogContentStyle}"/>
  <Style TargetType="dialogs:CreateUpdateSpreadsheetNameDialogContent" BasedOn="{StaticResource CreateUpdateSpreadsheetNameDialogContentStyle}"/>
  <Style TargetType="dialogs:ProtectDialogContent" BasedOn="{StaticResource ProtectDialogContentStyle}"/>
  <Style TargetType="dialogs:UnprotectDialogContent" BasedOn="{StaticResource UnprotectDialogContentStyle}"/>
  <Style TargetType="dialogs:PageSetupDialogContent" BasedOn="{StaticResource PageSetupDialogContentStyle}"/>
  <Style TargetType="dialogs:PageTabContent" BasedOn="{StaticResource PageTabContentStyle}"/>
  <Style TargetType="dialogs:MarginsTabContent" BasedOn="{StaticResource MarginsTabContentStyle}"/>
  <Style TargetType="dialogs:SheetTabContent" BasedOn="{StaticResource SheetTabContentStyle}"/>
  <Style TargetType="dialogs:FormatShapesDialogContent" BasedOn="{StaticResource FormatShapesDialogContentStyle}"/>
  <Style TargetType="dialogs:SortingDialogContent" BasedOn="{StaticResource SortingDialogContentStyle}"/>
  <Style TargetType="dialogs:TopFilterDialogContent" BasedOn="{StaticResource TopFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomFilterDialogContent" BasedOn="{StaticResource CustomFilterDialogContentStyle}"/>
  <Style TargetType="dialogs:CustomSortListsDialogContent" BasedOn="{StaticResource CustomSortListsDialogContentStyle}"/>
  <Style TargetType="dialogs:AlertDialogContent" BasedOn="{StaticResource AlertDialogContentStyle}"/>
  <Style TargetType="dialogs:ConfirmDialogContent" BasedOn="{StaticResource ConfirmDialogContentStyle}"/>
  <Style TargetType="dialogs:StopDialogContent" BasedOn="{StaticResource StopDialogContentStyle}"/>
  <Style TargetType="dialogs:WarningDialogContent" BasedOn="{StaticResource WarningDialogContentStyle}"/>
  <Style TargetType="dialogs:InformationDialogContent" BasedOn="{StaticResource InformationDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogContent" BasedOn="{StaticResource HeaderFooterDialogContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterDialogTabContent" BasedOn="{StaticResource HeaderFooterDialogTabContentStyle}"/>
  <Style TargetType="dialogs:HeaderFooterTabContent" BasedOn="{StaticResource HeaderFooterTabContentStyle}"/>
  <Style TargetType="dialogs:FormatFontDialogContent" BasedOn="{StaticResource FormatFontDialogContentStyle}"/>
  <Style TargetType="dialogs:UnhideSheetDialogContent" BasedOn="{StaticResource UnhideSheetDialogContentStyle}"/>
  <Style TargetType="dialogs:SimpleConditionalFormattingDialogContent" BasedOn="{StaticResource SimpleConditionalFormattingDialogContentStyle}"/>
</ResourceDictionary>
